Report

Help us improve this tool

Censor JSON

Remove, redact, or censor sensitive information (specific keys, number values, ranges, or custom text patterns) from your JSON files.

L ading . . .

Censor JSON - Safely Redact and Sanitize Sensitive JSON Files

Welcome to the online **Censor JSON** tool. This highly configurable utility helps developers, system administrators, and QA engineers sanitize JSON payloads before uploading them to public repositories, sharing them with third-party support teams, or using them in staging environments. Quickly redact passwords, API tokens, personal identifiable information (PII), or custom data columns entirely in your browser.

Why Censor Your JSON Data?

When debugging production issues or sharing server logs, JSON configuration files often contain highly sensitive variables. Examples include database connection credentials, private keys, credit card numbers, email addresses, and phone numbers. Passing these files unprotected violates security standards (like GDPR and PCI-DSS) and risks serious data breaches. Censor JSON solves this by scrubbing, replacing, or anonymizing targeted values while keeping the hierarchical JSON schema completely intact.

Key Features of the JSON Censoring Tool

  • Intelligent Key Matching: Specify a comma-separated list of keys (e.g. password, email, auth_token) to automatically replace their values with a custom placeholder.
  • Advanced Number Filtering: Censor numeric data types. You can choose to censor all numbers, a specific list of numbers, or a strict range of numbers (e.g., 10-500).
  • Regex and Pattern Matching: Provide custom regular expressions or string patterns to detect and replace matching substrings inside your string values (perfect for masking IP addresses or domain names).
  • Anonymize with Custom Placeholders: Replace targeted secrets with custom placeholders like [CENSORED], [REDACTED], or 0.
  • Local Browser Sandbox: The tool uses pure client-side JavaScript. Your file data is processed locally inside your browser and is never uploaded to external servers.

How to Sanitize Your JSON Payload

  1. Input: Paste your JSON payload into the **JSON Input** editor. You can load a sample structure to see the censoring settings in action.
  2. Define Redaction Settings: Toggle the matching checkboxes (Keys, Numbers, Patterns) and write your target keywords in the settings panel.
  3. Customize Output: Choose your output layout (Minified or formatted with 2 or 4 space indentation) and specify your placeholder text.
  4. Export: Click copy or download to get your sanitized censored.json file ready for public sharing.

Frequently Asked Questions

Is my sensitive data sent to a server?

No. Like all our online mini tools, the Censor JSON utility runs entirely in your web browser. All parsing, filtering, and replacements are handled locally via client-side JavaScript, ensuring complete confidentiality.

Can I censor values matching sub-keys or nested columns?

Yes. The tool recursively traverses all levels of your JSON structure, including nested objects and arrays. It matches target keys anywhere they appear in the hierarchy.

How does the number range filter work?

Enabling "Censor Numbers" allows you to target floating-point and integer numbers. By typing 10-100, only numeric values between 10 and 100 inclusive will be replaced. Leave the range blank to censor every single number in the file.

Can I use regular expressions to match data?

Yes. If "Censor Patterns" is enabled, you can pass comma-separated strings that are compiled into regular expressions (e.g. ip_address, @example\.com). They will replace any matching matches inside text strings with your defined placeholder.