W
WordBit
← All guides

Developer Text Formatting

Renaming fields between a database and a frontend, building a string that is exactly one character too long, filling a layout with placeholder copy, and deduping an exported list of IDs are small jobs that come up every week. This guide walks through each one with real inputs and outputs, so you know what the tools will and will not do before you paste anything into your codebase.

Last reviewed: October 2026

Which case goes where

Most naming arguments are settled by the language or tool you are writing for. The table below covers the conventions you will meet most often. When a project already has a style, follow the project, even if it differs from the table.

ContextConventionExample
JavaScript / TypeScript variables and functionscamelCaseuserCount, fetchOrders()
Classes, React components, TS typesPascalCaseOrderSummary, UserProfile
Python functions and variablessnake_caseget_user(), total_price
Constants (JS, Python, Java, Rust)CONSTANT_CASEMAX_RETRIES, API_TIMEOUT_MS
Environment variablesCONSTANT_CASEDATABASE_URL, NODE_ENV
SQL tables and columnssnake_casecreated_at, order_items
CSS classes, URL slugs, file nameskebab-case.nav-item, /blog/my-first-post
CLI flagskebab-case--dry-run, --output-dir
JSON keysDepends on the APIcamelCase (many JS APIs) or snake_case (many Python/Ruby APIs)

JSON is the one with no single answer. If you consume an API that returns created_at, you either keep snake_case in your frontend types or map it at the boundary. Pick one approach per project and write it down. For the background on each style, see case conventions in programming.

Step by step: database columns to camelCase props

Say a Postgres table gives you these column names and you need matching TypeScript props for a form component:

user_id
first_name
created_at
is_email_verified

The Case Converter treats everything in the input box as one phrase. It splits on any character that is not a letter or digit, and that includes line breaks. Paste all four lines at once and you get a single identifier, userIdFirstNameCreatedAtIsEmailVerified. So convert one name per pass:

  1. Paste user_id into the input box.
  2. Click camelCase. The result is userId.
  3. Click Copy and paste into your type definition.
  4. Replace the input with the next column name and repeat.
  5. Read the finished list once against the original columns. Check acronyms and domain terms by eye.

The finished result:

type UserFormProps = {
  userId: string;
  firstName: string;
  createdAt: Date;
  isEmailVerified: boolean;
};

The converter also splits existing camelCase and acronym boundaries, which is useful when going the other way. getHTTPResponse becomes get_http_response with snake_case, and userID becomes user_id. Accented letters are kept rather than stripped: Café crème becomes café_crème or caféCrème. That is correct text, but many languages and databases expect ASCII identifiers, so decide whether you want it.

Note that acronyms come out lowercased after the first word: user_id gives userId, not userID. If your codebase writes userID, fix those by hand.

The CONSTANT_CASE trick

There is no CONSTANT_CASE or PascalCase button. CONSTANT_CASE takes two clicks:

  1. Paste the phrase, for example max retry count, and click snake_case. You get max_retry_count.
  2. Copy the result back into the input and click UPPERCASE. You get MAX_RETRY_COUNT.

For PascalCase, run camelCase and capitalize the first letter yourself: orderSummary becomes OrderSummary.

Build boundary-test strings with Text Repeater

Length limits fail at the edges. If a column is varchar(255), you want a 255-character value that should pass and a 256-character value that should be rejected or handled cleanly. Typing those by hand is error-prone. With the Text Repeater:

  1. Enter a as the text.
  2. Set the repeat count to 256.
  3. Clear the separator field completely, so the copies are joined with nothing in between. The default separator is a newline (\n), which would add 255 extra characters.
  4. Generate, then confirm the length shown under the result reads 256.
  5. Repeat with a count of 255 for the passing case.

To predict output length before you generate, use: length = N × len(text) + (N − 1) × len(separator). A few worked examples:

"a" x 256, separator ""      -> 256 x 1 + 255 x 0 = 256
"test" x 100, separator ", " -> 100 x 4 +  99 x 2 = 598
"row" x 50, separator "\n"   ->  50 x 3 +  49 x 1 = 199

Two variations worth keeping around: repeat a multi-byte character such as é to test whether your backend limits characters or bytes (it is 1 character but 2 bytes in UTF-8), and repeat word with a space separator to test how a UI wraps a long unbroken paragraph.

Seed layouts with Lorem Ipsum

Placeholder copy shows how a card, table cell, or modal behaves with realistic text before the real copy exists. The Lorem Ipsum Generator has three modes, and each suits a different test:

  • Words gives exactly N words, starting with "Lorem ipsum" and ending in a period. Use it for headings and button labels where you need a fixed length, such as a 12-word title to check truncation.
  • Sentences gives sentences of 8 to 19 words. Use it for list items and table cells.
  • Paragraphs gives 4 to 7 sentences each, with random lengths. Generate a few times to see how the layout copes with uneven blocks.

The output is plain text with no HTML tags, so you can drop it into a fixture file or a JSX string directly. Replace it before launch; placeholder text left on a live page looks unfinished.

Dedupe exported IDs and emails

Exports from CRMs, logs, and spreadsheets often contain repeats. Remove Duplicates works line by line, keeps the first occurrence, and preserves the original order unless you turn on sorting. Here is a typical email export:

ana@example.com
Ben@Example.com
ana@example.com
ben@example.com
  carla@example.com
  1. Paste the list into the input.
  2. Leave Trim line edges on so the indented line matches its unindented twin.
  3. Turn Case sensitive off for emails, since the domain part is case-insensitive and most systems treat the whole address that way. For IDs, tokens, or file paths, leave it on: AB12 and ab12 may be different records.
  4. Run it and check the counts: original lines, unique, removed.

With case sensitivity off, the result is three lines and two removed:

ana@example.com
Ben@Example.com
carla@example.com

The first spelling wins, so Ben@Example.com survives in its original case. Run the list through lowercase in the Case Converter first if you want normalized output. For more text-cleanup steps, see the text cleanup workflow.

Common pitfalls

  • Title Case lowercases acronyms. It capitalizes the first letter of every word and lowercases the rest, so NASA API becomes Nasa Api and iPhone becomes Iphone. Do not use it on identifiers or brand names without a manual pass.
  • Emoji are not one character in JavaScript. "👍".length is 2, and the family emoji is 11. If your validation uses .length, an emoji-heavy input hits the limit sooner than users expect. The Character Counter shows both the JavaScript length and visible characters.
  • Invisible characters survive dedupe. Zero-width spaces are not removed by trimming, and lookalike characters compare as different. If two lines look identical but both survive, one of them contains something you cannot see.
  • Lists collapse into one identifier. As shown above, the code-style cases treat line breaks as word separators. Convert one name at a time.
  • Pasting secrets into websites. WordBit's tools run in your browser and do not send your text anywhere, but the habit is what matters. API keys, tokens, and production connection strings should not go into any web tool. Use a placeholder like sk_test_XXXX when you only need the shape.

Checklist before you commit

  • Converted names match the project's existing convention, not just the language default.
  • Acronyms and brand terms were checked by hand after conversion.
  • Boundary strings were generated at limit and limit + 1, with the length confirmed.
  • Placeholder copy is confined to fixtures, stories, or mockups.
  • Deduped lists used the right case-sensitivity setting for the data type.
  • No real credentials or customer data went into test strings.
  • The pull request notes the transformation, for example: "Converted exported field names from snake_case to camelCase for frontend fixtures."

Useful WordBit tools for this workflow