Skip to main content
VVertex Solutions
All toolsPDF ToolsImage ToolsText ToolsCalculatorsDeveloperBlog
VVertex Solutions

Browse tools for merging and compressing PDFs, resizing and converting images, formatting text and JSON, running calculators, and working with code.

Popular Tools

  • Mortgage Calculator
  • GPA Calculator
  • Tip Calculator
  • BMI Calculator
  • Percentage Calculator
  • EMI Calculator
  • Merge PDF
  • JSON Formatter

Categories

  • All tools
  • PDF Tools
  • Image Tools
  • Text Tools
  • Calculators
  • Developer Tools

Company

  • About
  • About the Author
  • Editorial Standards
  • How We Verify Tools
  • How Data Is Processed
  • Calculator Comparisons
  • Disclaimer
  • Privacy Policy
  • Cookie Policy
  • FAQ
  • Accessibility
  • Changelog
  • Terms of Service
  • Contact
  • Blog
  • RSS Feed

© 2026 Vertex Solutions. All rights reserved.

Free tools. No signup. Privacy first.

  1. Home
  2. Blog
  3. Case Conversion for API Data Cleanup, Normalizing Messy Exports
Textinformational7 min readPublished 2026-04-19 · Last updated 2026-10-23

Case Conversion for API Data Cleanup, Normalizing Messy Exports

API exports mix PRODUCT_NAME, productName, and "Active" with "ACTIVE." Lowercase the keys you match on, keep display names and passwords as they are, trim spaces before you convert, and map the exceptions. Case conversion does not fix JSON syntax.

By Rehan Baqir

Quick answer

Pick one casing convention per API and write it down. Lowercase the keys and enums you match on. Do not lowercase display names such as McDonald or iPhone, and do not change the case of a password. Case conversion does not fix JSON syntax. Trim spaces before you convert, then map the exceptions.

Case conversion changes letters so matching keys and enums collapse to one form. It does not rewrite schema, insert underscores, or fix JSON syntax, and it will damage a display name or a password if you run it on the wrong field. Use the Case Converter for a one-off paste. Script the rule once you know which fields are canonical and which must stay as the user typed them. Lowercase keys you join on. Preserve brand and display casing. Trim whitespace before you convert.

A webhook looked fine until someone grouped by status and got twelve buckets for what should have been three. ACTIVE, active, Active, and active with a trailing space all counted as different values. The bug was casing. Case conversion fixes that in minutes if you apply it to the right fields.

API integrations inherit old naming. A CRM export arrives in UPPERCASE. A legacy system sends Customer_Name. A mobile client sends productId while the warehouse expects product_id. Case conversion will not solve every schema mismatch. It is the fastest first pass, before regex, mapping tables, and migration scripts.

Canonical keys and display labels

Production systems should separate two layers.

Canonical keys use lowercase, or one documented convention, for storage, joins, and API matching.

Display labels use whatever case the user or the brand requires.

Converting NEW YORK to new york for a grouping key is useful. Converting McSorley's to mcsorley's on a shipping label is not.

The Case Converter does the mechanical change. You decide which fields get which treatment.

Common messes

| Source | Example field | Problem | | --- | --- | --- | | Legacy SQL export | PRODUCT_NAME | All-caps constants | | .NET API | ProductName | PascalCase properties | | JavaScript client | productName | camelCase | | Python service | product_name | snake_case | | CSV header row | Product Name | Spaces and title case | | Enum values | PENDING, Pending | Duplicate logical states |

Case conversion is step one. A structural rename, such as spaces to underscores, is step two.

Cleaning a JSON export

A partner sends nightly JSON with inconsistent enum casing.

  1. Validate the JSON. The JSON Validator catches syntax errors before you touch values.
  2. Identify the enum fields: status, type, country_code.
  3. Extract the unique values into a text file.
  4. Lowercase them for an inventory. The Case Converter shows the real distinct count.
  5. Build a mapping table: PENDING to pending, Active to active.
  6. Apply the map in ETL. Do not paste production volume by hand.
  7. Spot-check the output with the JSON Formatter.

Lowercasing showed that active and active differ. Trim whitespace before you normalize case.

Field names and field values

Standardize keys to one convention:

ProductName → productName (camelCase API)
PRODUCT_NAME → product_name (snake_case warehouse)

Case conversion handles letter case. Inserting underscores between words needs a regex or a camelCase splitter:

productName → product_name  (not just lowercase → productname)

Values depend on the domain:

| Value type | Normalize? | | --- | --- | | Enum or status | Yes, to a lowercase canonical value | | Email | Often lowercase the whole address | | Country code | Uppercase ISO, such as US | | Password hash | Never change case | | Display name | Preserve what the user typed | | SKU or product code | Case-sensitive. Do not convert |

Email and usernames

Many systems lowercase an email before storage so the same person cannot open two accounts:

User@Example.COM → user@example.com

Write that policy down. Passwords stay case-sensitive. Never run case conversion on a credential. See the password security guide.

Spreadsheets and CSV imports

A CRM City column arrives like this:

NEW YORK
new york
New York

For a pivot table or a VLOOKUP:

  1. Paste the column into the Case Converter.
  2. Lowercase the whole column.
  3. Re-import it as city_normalized.
  4. Keep the original column for display if you need it.

Pair that with the Word Counter when a title field has a length limit.

Prevent the mess in the API

If you control the API:

  • Document the casing in the OpenAPI spec
  • Reject an unknown enum casing with a 400 and a clear error
  • Emit lowercase enums in JSON responses
  • Lint the schema definitions

If you consume a third-party API:

  • Normalize on ingest, not on every read
  • During a migration, store both raw_status and status_normalized
  • Log an unmapped value. Do not drop it silently

Locale traps

Turkish dotted and dotless I breaks naive lowercasing:

Istanbul.toLowerCase() → istanbul  (wrong in Turkish locale)
İstanbul → requires toLocaleLowerCase('tr')

German ß uppercases to SS, and the round trip is imperfect.

For English-only SKU cleanup, a simple converter is enough. For international customer names, use a locale-aware API in production code. The browser Case Converter is a preview. It is not internationalization infrastructure.

Keys change the object shape

{ "ProductName": "Widget" }

After key lowercasing, without a structural rename:

{ "productname": "Widget" }

That is not:

{ "product_name": "Widget" }

Automate key renames with jq, a Python dict comprehension, or a migration script. Use case conversion on values pasted as plain text. Use code for key transforms.

Read JSON vs JSONL when the export is line-delimited. Normalize each line in a streaming ETL job.

Underscores after the case change

From screaming snake case toward camel case:

  1. Lowercase: STATUS_CODE becomes status_code, if that is the target.
  2. Or split on _, capitalize the later segments, and produce statusCode.

The Case Converter will not insert underscores. Chain a search-and-replace, or do it in code.

Test the normalization

| Input | Expected canonical | | --- | --- | | ACTIVE | active | | Active | active | | active | active after trim | | McDonald | mcdonald, or preserve it. Document the choice |

Assert the table in unit tests. One shared test UUID or constant across tests hides integration bugs. The same discipline shows up in how UUIDs work for IDs.

When case conversion is not enough

  • Synonyms: USA, US, and United States need a lookup table
  • Typos: actve will not match active after lowercasing
  • Encoding: mojibake from the wrong character set has to be fixed before any text transform
  • Spelling variants: cancelled and canceled

Normalize case first. Fuzzy-match second. A person reviews third.

Related articles

  • Case converter guide: writing and SEO workflows
  • JSON formatting guide: structural fixes, and how to inspect a cleaned payload

Limitations

Changing case does not repair trailing commas, quotes, or other JSON syntax errors. It does not insert underscores, translate synonyms, or apply Turkish or German case rules unless the code is locale-aware. A browser tool previews a paste. It is not a nightly ETL job. Edge cases and platform limits vary. Test on a sample payload first, and keep the original export archived.

Separate canonical keys from display values, then convert case only where enums and match fields need one form. Lowercase for grouping. Preserve case for brands and passwords. Trim before you convert. Follow with a mapping table for the exceptions. The Case Converter speeds up the first pass. The production pipeline should script the rules you find in that pass.

Related Tools

Free browser-based tools referenced in this article.

Case Converter
Case converter for upper, lower, title, camelCase, snake_case, and kebab-case.
JSON Validator
JSON validator that parses input and reports the syntax error. It does not reindent the document.
Featured
JSON Formatter
JSON formatter to pretty-print or minify JSON. Use JSON Validator when you only need the error.
Word Counter
Word counter for words, characters, sentences, paragraphs, and a reading-time estimate.

Key takeaways

  • Pick one convention per API and document it.
  • Lowercasing a display name destroys intent, as with McDonald or iPhone.
  • Build a mapping table from legacy enum values to canonical values.
  • Changing case does not break JSON syntax.

Frequently Asked Questions

Common questions answered to help you get the most from this tool.

Pick one convention per API and document it. JSON often uses camelCase in JavaScript stacks and snake_case in Python and Ruby stacks. Consistency matters more than which one you pick.

No. Lowercasing a display name destroys user intent, as with McDonald or iPhone. Lowercase canonical keys used for matching. Keep the original casing on display fields when you need it.

Build a mapping table from the legacy values to canonical values. Case conversion is a first pass. An explicit map handles exceptions such as TRUE, true, and True.

No. Changing case does not break JSON syntax. Structural problems, such as trailing commas and quotes, need a separate fix in a JSON validator.

Yes. Script it with a language library for production volume. A browser case converter is for a one-off import and for a spot check before you script the rule.

About the author

Rehan Baqir is the founder & editor of Vertex Solutions. He builds browser-based tools and writes guides about PDF workflows, calculators, image tools, and developer utilities. Article pages show their publication and update dates when available. Read the editorial standards and tool-testing method for the site's stated approach to content and verification.

More about Rehan Baqir →

case conversionapidata cleanupnormalizationtext
Back to all articles

On this page

  • Canonical keys and display labels
  • Common messes
  • Cleaning a JSON export
  • Field names and field values
  • Email and usernames
  • Spreadsheets and CSV imports
  • Prevent the mess in the API
  • Locale traps
  • Keys change the object shape
  • Underscores after the case change
  • Test the normalization
  • When case conversion is not enough
  • Related articles
  • Limitations

Related Articles

  • Password security guide: length, randomness, and safe storage
  • What a context window actually holds
  • Embeddings and keyword search