Data Formatter turns a minified API response or a messy config file into something you can read. Paste the text or drop a file, press Format and the JSON is re-indented with 2 spaces, 4 spaces or tabs, with big numbers and escapes left exactly as written. If the input is broken, a red panel under the editor says what is wrong and gives the exact line and column.
The same editor also tidies XML, YAML, TOML, SQL and CSV, minifies JSON, XML and SQL, and converts data between JSON, XML, YAML and CSV. It is meant for developers debugging API calls, people editing configuration files and anyone who receives a data export and needs to look inside it quickly.
A typical case: a response copied from your browser's network panel or from curl arrives as one long line. Format it to see the structure, fix the value you need, then Minify it again and paste it back into your request. Another one: someone sends you a CSV export while your script expects JSON. Paste the CSV, choose CSV in the Format menu, convert it to JSON and download the file.
Everything runs in your browser tab. The text you paste and the files you open are not uploaded, there is no account to create, and the tool is free to use.
Paste JSON, XML, YAML, TOML, SQL or CSV into the editor, type it, or drop a file on the page. Line numbers and the size update as you go.
Pasting into an empty editor or opening a file selects the format for you. Otherwise pick it in the Format menu, and choose the indentation: 2 spaces, 4 spaces or Tab. Both choices are remembered.
Press Format or Ctrl+Shift+F to pretty-print, Minify to compress JSON, XML or SQL, or Validate to check the syntax without changing anything.
Choose JSON, XML, YAML or CSV under Convert to and press Convert. The Format menu switches to the new format, and Undo brings the original back.
Press Copy to put the text on the clipboard or Download to save it. An opened file keeps its name, otherwise the file is called data with the extension of the current format.
Yes. It is free, has no usage limit and needs no account or sign-up. Text over about 1.5 MB opens in a fast read-only preview, and Format, Minify, Validate, Convert, Copy and Download still work on all of it. Files can be up to 300 MB. A file that large can still be too much for one action, such as Convert, and the tool then says so. Phones run out of memory sooner.
No. Formatting, validation, minifying and conversion all run in JavaScript inside your browser tab, and neither pasted text nor opened files are ever sent to a server. Text up to about 1.5 MB is kept in this tab so a reload does not lose it, and it is gone when you close the tab. Copy or download anything you want to keep.
JSON, XML, YAML, TOML, SQL and CSV. JSON and XML are parsed and re-indented, with numbers, escapes and entities kept exactly as written. YAML is re-indented along its structure, TOML gets tidy key = value spacing and a blank line before each [section], SQL gets uppercase keywords with each clause on its own line, and CSV columns are padded so they line up.
Any direction between JSON, XML, YAML and CSV, for example JSON to XML, XML to JSON, YAML to JSON or CSV to JSON. TOML can be converted to those four as well, but not created. SQL can be formatted and checked but not converted. For CSV output, nested objects become dotted columns such as address.city, and lists inside a record stay as JSON text in one cell.
Errors appear in a red panel under the editor with the exact line and column, a copy of the broken line and a button that jumps to it. JSON, XML, YAML and TOML are read by full parsers, and XML also goes through the browser's own parser. CSV is checked for unclosed quotes and rows whose column count differs from the first row. SQL only gets basic checks for quotes, comments, brackets and the first word of each statement, so passing them does not prove the SQL will run.
JSON, XML and SQL. Minifying SQL also removes -- line comments and /* block */ comments. YAML, TOML and CSV are not minified, because their line breaks and indentation carry meaning or there is nothing useful to remove.
Yes. All the actions, including Open and Convert, become icon buttons big enough to tap, and the editor takes the rest of the screen.
Nearly. The built-in reader handles nested keys, lists of objects, quoted strings, block strings written with | or >, inline [ ] and { } collections, comments, anchors, merge keys and several documents in one file. It follows YAML 1.2, so yes and no stay text. Complex keys written with ? are not supported, and custom tags such as !Ref are ignored in conversions.