Remove Fields (Free Online Tool)

Remove known fields, paths, or matching keys from JSON without masking the values

Paste your JSON → Get results instantly (no signup)

⚡ Instant resultsNo signupRuns in your browser
Try examples:

Remove unwanted fields from this data and remove by key name.

{
"id": 1,
"name": "Alice",
"_internal": "debug",
"__v": 0,
"metadata": {
"created": "2024-01-01",
"_temp": true
}
}
Output
1{
2 "id": 1,
3 "name": "Alice",
4 "metadata": {
5 "created": "2024-01-01"
6 }
7}

Love the result?

Use this exact pipeline in your app, backend, or LLM workflow.

No setup needed. Works with curl, Node, Python.

Uses example data. For edited input, copy from the playground.

Read integration guide

Works with:

  • API responses
  • Nested JSON
  • Arrays & objects

Example: input → output

Input / Output
Input
{
"id": 1,
"name": "Alice",
"_internal": "debug",
"__v": 0,
"metadata": {
"created": "2024-01-01",
"_temp": true
}
}
Output
{
"id": 1,
"name": "Alice",
"metadata": {
"created": "2024-01-01"
}
}

Related tools

Advanced usage (optional)

Remove Fields

v1.0.0
Cleanup
objectarraydestructive

Description

Remove Fields

Surgically remove fields by path, key name, regex pattern, or value matching. Supports multiple removal strategies that can be combined for precise data cleanup.

Removal Strategies

By Path

Select exact paths to remove using the path picker. Supports nested paths and wildcards.

By Key Name

Provide an array of key names to remove at any depth. For example, ["_internal", "__v", "debug"] removes all keys with those exact names regardless of nesting.

By Key Regex

Provide a regex pattern to match key names. For example, ^_ removes all keys starting with an underscore at every level.

By Value Match

Remove fields whose string value contains specified text (case-insensitive). For example, matching "TODO" removes any field containing "TODO" in its value.

Configuration

FieldTypeDefaultDescription
Paths to Removepath-picker[]Select exact paths to remove (supports wildcards)
Key Namesjson[]JSON array of key names to remove at any depth
Key Regexstring""Regex pattern to match key names for removal
Value Matchstring""Remove fields whose string value contains this text (case-insensitive)

Use Cases

API Response Cleanup

  • Internal fields: Remove _id, __v, _internal metadata from MongoDB responses
  • Debug data: Strip debug, trace, _log fields before sending to clients
  • Versioning: Remove __typename fields from GraphQL responses

Data Sanitization

  • Underscore-prefixed: Remove all _ prefixed private fields with regex ^_
  • Test markers: Remove fields containing "TODO", "FIXME", or "HACK" by value matching
  • Sensitive data: Remove password, secret, token fields by key name

Schema Migration

  • Deprecated fields: Remove fields that are no longer part of the schema
  • Redundant data: Strip computed or cached fields before storage
  • Selective pruning: Remove specific nested paths while keeping the rest

Configuration

NameTypeDefaultDescription
Paths to Removepath-picker[]Select exact paths to remove (supports wildcards)
Key Namesjson[]JSON array of key names to remove at any depth. Example: ["_internal", "__v", "debug"]
Key RegexstringRegex pattern to match key names for removal. Example: ^_ (removes all underscore-prefixed keys)
Value MatchstringRemove fields whose string value contains this text (case-insensitive)

Examples

AI Prompt
Remove unwanted fields from this data and remove by key name.
{
"id": 1,
"name": "Alice",
"_internal": "debug",
"__v": 0,
"metadata": {
"created": "2024-01-01",
"_temp": true
}
}
Output
1{
2 "id": 1,
3 "name": "Alice",
4 "metadata": {
5 "created": "2024-01-01"
6 }
7}
Config
Paths to Remove
all
Key Names
1[
2 "_internal",
3 "__v",
4 "_temp"
5]
Key Regex
Value Match

API Usage

POST /api/v1/utilities/cleanup.remove-fields
Example:
curl -X POST https://your-domain.com/api/v1/utilities/cleanup.remove-fields \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"primary":{"id":1,"name":"Alice","_internal":"debug","__v":0,"metadata":{"created":"2024-01-01","_temp":true}}},"config":{"paths":[],"keyNames":["_internal","__v","_temp"],"keyRegex":"","valueMatch":""}}'
Response
1{
2 "id": 1,
3 "name": "Alice",
4 "metadata": {
5 "created": "2024-01-01"
6 }
7}