pipr.tools
Pipes
Clean Email Strip formatting from pasted email for clean plain text Clean AI Output Clean plain text from ChatGPT or AI output Decode & Format JWT Decode a JWT and pretty-print header and payload Word Frequency Count word frequency in text

json-minify Minify and compress JSON

⟐ Data
Input0 chars
Output0 chars

Examples

Minify a formatted JSON object

Usage
"{
  "name": "Alice",
  "age": 30
}" | json-minify

Compress JSON for embedding in a URL parameter

Usage
"{
  "query": "SELECT *",
  "params": {
    "limit": 10,
    ..." | json-minify

Minify a JSON config to a single line for copying

Usage
"{
  "theme": "dark",
  "fontSize": 14,
  "autoSave": true
}" | json-minify
View source
(input)=>{
                try {
                    return JSON.stringify(JSON.parse(input));
                } catch (e) {
                    return `Error: ${e.message}`;
                }
            }

Also useful for