Developer Công cụ đã được cập nhật 5 ngày trước

Free JavaScript (JS) Formatter Online

Format your messy JavaScript (JS) source code to make it easier and faster to read and understand.

JS Formatter Beautify JS Readable Code Online Formatter

Sử dụng Free JavaScript (JS) Formatter Online

Dán URL trực tiếp của tệp mã để tải nội dung của tệp đó vào trình soạn thảo.

Kết quả

Xong
Liên kết công cụ
Đã sao chép vào khay nhớ tạm.
Hãy giúp cải thiện công cụ này
62
Thời gian sử dụng
63
Tổng số người dùng
5+ năm
Đã phục vụ
Được rà soát lần cuối vào 5 ngày trước. Số liệu sử dụng được cập nhật trong các đợt kiểm toán định kỳ. (Bắt đầu báo cáo từ 21 Feb 2022)
Báo cáo sự không khớp

Đọc nội dung

Tìm hiểu cách thức hoạt động của công cụ này và khi nào nên sử dụng nó.

Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” — Martin Fowler

What is Beautifying?

Beautifying or formatting source code is to reformation of source code to improve code readability, based on an analysis of the syntax for a human for some user-defined conventions like re-indenting codes lines, splitting the code into lines, creating blocks, adding white spaces at required places to make it easier and faster to read and understand.

    Difference of Formatted JS and Minified or non Beautified JS

Non Formatted JS:

function loadData(parameter){$.get('https://www.google.com',function(data){console.log(data)
showData(data)});}
function showData(data){document.getElementById("set_data").innerHTML=data;}
window.onload=function(){console.log('page loaded')}
alert("Testing functionalities");

Beautified JS:

    function loadData(parameter){
        $.get('https://www.google.com', function(data) {
            console.log(data)
            showData(data)
        });
    }
    function showData (data) {
        // body... 
        document.getElementById("set_data").innerHTML = data;
    }
    window.onload = function(){
        console.log('page loaded')
    }
    alert("Testing functionalities");

How to use this JS Formatter 

You can format your JS code by using this tool. This JS Formatter tool is very simple to use. To Beautify JS just put the targeted webpage URL or paste JS code and click Beautify Button. Booom, your Formatted code is ready for use. Now you can copy your code or download it.

Bình luận (0)

Dành cho các cuộc thảo luận của người dùng, các trường hợp ngoại lệ và các mẹo bổ sung.
Để lại bình luận
Bình luận của bạn sẽ được hiển thị công khai sau khi gửi.
Chưa có bình luận nào. Hãy là người đầu tiên bình luận!
Hãy cho chúng tôi biết!
Báo cáo sự cố liên quan đến công cụ này

Hãy mô tả vấn đề mà bạn gặp phải để chúng tôi có thể tìm hiểu và cải thiện công cụ này.

Điều gì hữu ích nhất
Vui lòng cung cấp thông tin về dữ liệu đầu vào, kết quả mong đợi, kết quả thực tế, trình duyệt/thiết bị và ảnh chụp màn hình (nếu có thể).
Nút chụp màn hình sẽ chụp lại trang web trong trình duyệt và đính kèm hình ảnh được tạo ra vào biểu mẫu này.
Ảnh chụp màn hình toàn trang
Được ghi lại trên trình duyệt của bạn bằng newisty.
Chưa có ảnh chụp màn hình nào được chụp.
Công cụ Báo cáo