Paste JSON, XML, HTML, SQL... and get it instantly formatted

Format Express
No match found. All lines have been filtered out.
Tired of repeating "Select All, Delete, Paste" ?
Gain some time by automatically replacing previous input on paste.
Activate this setting Not interested
Many values of this XML contain white spaces or newlines.
Do you want to automatically trim the XML values ?
Just this time Always Never
Some values of this JSON contain newlines.
Do you want to remove them ?
Join lines Join lines with a space Do nothing

About

Format Express is the ideal companion to help you read minified input found in logs or web services.

This is an universal online formatter (JSON, XML, HTML, SQL, …): what you paste is immediately beautified with syntax highlighting, node navigation, minimap, recursive formatting, search supporting regular expression, ...

What are the supported formats ?
  • JSON, and anything that looks like JSON (like the dump of a Javascript object, HJSON, dictionary without quotes, php serialization...).
  • XML, either a complete document or just a fragment.
  • HTML, and also formats CSS inside <style> tag and Javascript inside <script> tag.
  • YAML, not much for formatting, but for a nice viewer.
  • SQL, mostly ANSI syntax (⚠ vendor specific dialects and PL/SQL may not be correctly interpreted).
Is this a validator ?

No, it's not a validator: the formatter is very permissive and will do its best even with malformed data.

What do you mean by “permissive” ?

I just try to make your life easier:

  • you copied JSON from a log file and mistakenly included the date/time logs ? Format Express will format the JSON nonetheless.
  • your browser added minus signs at the beginning of each XML tags ? Format Express will remove them.
  • you selected input from a fixed-width console which adds dummy new lines every 80 chars ? Format Express will ignore them.
  • you found XML inside another XML tag ? Format Express can unescape the inner XML and format it.
  • you uncovered an ugly SQL request in Java source code ? Paste it with the quotes and Format Express will unescape it for you.
  • and much more...
Tell me about privacy. Is my data safe ?

Yes. The data submitted on this site is securely sent over HTTPS to the server for the formatting, where it is neither saved* nor logged.
* unless using the link API (see below). In this case the input is saved for 10 days.

How can I trust you ?

You can't ! So if your data contains sensitive or personal information, do not submit it on any random website, including this one.

Can I paste an URL and get its response formatted ?  
    Yes, but there are some restrictions. The URL will be called by your browser, so the CORS security mechanism applies : the content can be retrieved only if the response contains an Access-Control-Allow-Origin header. This header is required to allow the response to be read by Format Express. It can be either one of those : Access-Control-Allow-Origin: * # any origin Access-Control-Allow-Origin: https://format-express.dev # explicitly allow Format Express Alternatively, you may try to disable CORS security in your browser, or call the URL yourself and paste it manually (yeah, life is harsh).
Can I use Format Express from the command line ?  
Yes, there is an http API (beta) that can be used with curl; 2 methods available :
  • format : returns the formatted input as raw text
  • link : returns a unique link to explore the formatted input in your browser (with syntax coloring, blocks, etc...)
See examples below :
# Raw formatting is available on /api/beta/format ; Send the input in the body of a POST request. $ curl https://format-express.dev/api/beta/format -d '{"test":{"success":true}}' { "test": { "success": true } } # To view the result in your browser, use the /api/beta/link ; The link is available for 10 days. $ curl https://format-express.dev/api/beta/link -d '{"test":{"success":true}}' https://format-express.dev/snippet/foo1234 # Extract the relevant lines of a file and pipe them to the curl command with the "-d @-" option. $ grep 08:25:00 file.log | curl https://format-express.dev/api/beta/format -d @- 2021-07-04 08:25:00 <?xml version="1.0" encoding="utf-8" ?> ... # TIP: for easier usage, create an alias. $ alias formatexpress='curl https://format-express.dev/api/beta/format -d @-' $ sed '2,4!d' file.log | formatexpress 2021-07-04 00:02:48 <?xml version="1.0" encoding="utf-8" ?> ...
Keyboard shortcuts
  • Arrow keys : navigate from line to line, expand or collapse blocks.
  • Ctrl + arrow keys : navigate 20 lines at a time.
  • Alt + arrow keys : navigate between lines of the same level.
  • Ctrl + Alt + arrow keys : scroll window.
Latest features
  • Improved formatting for raw Ruby objects (September 2024)
  • Add setting for XML tags disposition (tags on separate lines) (August 2024)
  • Improved SVG preview (August 2024)
  • Added setting to align JSON values inside the same block (July 2024)
  • Added setting to unescape all unicode sequences in JSON values(May 2024)
  • Rework on the unescape unicode chars tooltip menu, and add settings to do it automatically (JSON and/or XML) (February 2024)
  • Added setting to handle malformed JSON with values split on several lines (February 2024)
  • Can wrap lines in the multiline content modal (January 2024)
  • Added settings to toggle on/off the decorators (January 2024)
  • When an URL is pasted, request its content via the browser and format it (November 2023)
  • Better support for raw HTTP headers (August 2023)
  • Coordinates (latitude, longitude) can be opened in OpenStreetMap (July 2023)
  • Added settings, like the date format for date and timestamps (in tooltips) (May 2023)
  • Improve formatting of input containing noise like log tags: [2023-03-31 15:40:34:380] INFO… (April 2023)
  • Handle JSP syntax and taglibs in HTML code (September 2022)
  • Display dates in human format on hover (August 2022)
  • Preview of images, either as raw data or via URL (July 2022)
  • Dynamic preview of SVG paths and HTML colors (March 2022)
  • Support for raw Javascript (beta) (January 2022)
  • Better support for XML DTDs (December 2021)
  • Format Javascript inside HTML documents (November 2021)
  • Support for PHP serialized objects (October 2021)
  • Adds API entry point (beta) for command line formatting (July 2021)
  • The viewer now supports YAML (June 2021)
  • Improved HTML and CSS support (May 2021)
  • Filter option in search to show only lines with matches (April 2021)
  • Warnings for mismatched tags and symbols (March 2021)
  • Huge performance improvement for large inputs, and the max limit size has been increased to 8Mb. (March 2021)
  • Settings to change the number of spaces used for indentation. More settings will be added later (February 2021)
  • Keyboard navigation, drag and drop of text and files (January 2021)
  • Replace unicode notation \uXXXX or &#XXXX; with the real character via a tooltip menu (December 2020)
  • Detect XML or JSON inside a value. The value can be unescaped and formatted via a tooltip menu (December 2020)
  • Minimap of the formatted text for easier navigation (November 2020)
  • In-app search, with regular expressions support (September 2020)
  • Dark mode (May 2020)
  • Breadcrumb navigation for XML and JSON (May 2020)
  • Partial Hjson support : comments, multiline strings (April 2020)
  • Support for input copied from a fixed-width console (April 2020)
  • Syntax highlighting for XML, JSON and SQL + expand/collapse nodes (March 2020)
  • More flexibility for the XML formatter and limited HTML support (February 2020)
  • More flexibility for the JSON formatter : fragments, single quotes, missing quotes... (January 2020)
How to support Format Express ?


Your donation will be used to support server costs. Any amount will be appreciated.

Created by Christophe Boulet : LinkedIn Stackoverflow