Skip to main content
All tools

Online code and document formatting tools

Format JSON, XML, YAML, JavaScript, CSS, SQL and Markdown. Syntax tips, input and output examples, and compression options are provided, and the code is processed in the browser.

Select tool

  • JSON formatting

    Format, compress, and check JSON syntax online, preserving the original text of large integers, exponents, and numbers. Choose 2 or 4 space indentation and copy results with one click; all input is processed only in the browser.

  • XML formatting

    Organize XML indentation or compress typesetting whitespace in the browser, support attributes and comments. Provides examples and copy functionality to clearly indicate the risk of whitespace in mixed text content and does not load external entities.

  • YAML formatting

    Format YAML online with 2- or 4-space indentation and syntax checks. Keeps comments, anchors and multiline text without expanding aliases; application-specific configuration still needs validation.

  • JavaScript formatting

    Use Prettier to format JavaScript/JSX, or Terser to minify JavaScript. Provides JSX examples, indented selection and direct action buttons, typing code will not run.

  • CSS formatting

    Format or minify CSS online with support for indentation selection, responsive media query examples, and result duplication. Styles are only processed as text and are not injected into the current web page or loaded from external resources.

  • SQL formatting

    Arrange query layout in standard SQL, PostgreSQL, MySQL, SQLite, T-SQL, or BigQuery. Provides dialect examples and indentation options, only handles text, does not connect to or manipulate a database.

  • Markdown editor

    Edit and format Markdown with a live preview of tables, task lists and code blocks, useful for drafting a README. Runs locally; raw HTML and remote images are not rendered, and content is not hosted or saved.

How to choose

Select the corresponding language
JSON, XML and YAML use their own syntax checking and formatting rules; JavaScript / JSX, CSS and SQL use corresponding formatters. Don't treat JSONC, TypeScript or templating languages ​​directly as standard JSON/JavaScript.
Distinguish between typesetting and validation
Formatting makes the content more readable, but does not mean that the business logic, database statements, or application configuration are correct. You can use the text comparison tool to check the differences before and after modification.
View Markdown
The Markdown editor supports previewing of tables and task lists; it does not render raw HTML or automatically request external images from the document.