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

Format Express
Format this value in a new tabin current tab
Show multiline content
Replace unicode and escaped characters
Restore original
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
Many values of this JSON contain white spaces or newlines.
Do you want to trim these values ?
Yes No Never

About

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

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 for invalid data.

What do you mean by “permissive” ?

I'm just trying to make your life easier:

  • you copied JSON from a log file and mistakenly included the date/time ? 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 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.
* the only exception is when using the link API where 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.

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.
Can it be used from 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" ?> ...
How to support Format Express ?


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

Latest features
  • 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)
Created by Christophe Boulet : LinkedIn Stackoverflow