UseToolSuite UseToolSuite

Text Case, Sort & Slug Converter

Three transforms for a block of text: re-case identifiers across seven conventions, sort and deduplicate lines with locale-aware or natural ordering, and slugify titles into clean permalinks.
Standard / Spec
Unicode 16.0 Case Mapping (TR21)
Execution
100% Client-Side
Privacy Level
Zero Data Stored
License / Cost
Free / No Account

Convert between camelCase, PascalCase, snake_case, kebab-case, Title Case, UPPER and lower.

Naming conventions by programming language

Each language has established conventions: JavaScript uses camelCase for variables and PascalCase for classes. Python uses snake_case for functions and variables, PascalCase for classes. CSS uses kebab-case for class names and custom properties. Go uses PascalCase for exported identifiers and camelCase for unexported ones. Rust uses snake_case for functions and SCREAMING_SNAKE_CASE for constants. Following these conventions makes your code instantly familiar to other developers in that ecosystem and avoids linter warnings.

Converting case

The Change case mode above - the default when you open this page.

Converting cases as part of a refactor

Renaming identifiers across a codebase is rarely a one-off, it usually happens when adopting a linter rule or moving code between languages. A practical workflow: copy the identifier list out of your linter report (ESLint’s camelcase rule, PEP 8’s invalid-name from pylint), paste the list here one per line, convert, and use your editor’s multi-cursor or a sed script to apply the renames. Converting the names first and reviewing them as plain text catches awkward results, like an acronym that splits badly, before they touch the code.

Edge cases worth knowing

  • Numbers stick to the word before them: user2fa → user_2fa in snake_case, keeping the digit grouped with its suffix.
  • Mixed separators (hello_world-FooBar) are normalized in one pass; you don’t need to pre-clean the input.
  • Title Case follows headline conventions: every word is capitalized. For AP-style headlines where short conjunctions stay lowercase, do a manual pass afterwards, automated AP capitalization requires a dictionary of minor words.
  • SCREAMING_SNAKE_CASE is just snake_case + UPPER: convert to snake_case first, then apply UPPERCASE if you need constant style.

Where each convention is expected

Beyond per-language norms, casing matters at system boundaries: REST APIs conventionally use snake_case or camelCase JSON keys (pick one and stay consistent), environment variables are SCREAMING_SNAKE_CASE by POSIX convention, CSS custom properties and HTML data attributes must be kebab-case (HTML attribute names are case-insensitive), and database identifiers are safest in snake_case because unquoted identifiers fold to lowercase in PostgreSQL and uppercase in Oracle. Converting at these boundaries, rather than letting two conventions leak into one layer, is what keeps serializers and ORMs configuration-free.


Sorting lines

The Sort lines mode above, or jump straight to it.

More than alphabetical: the sort modes that matter

Sorting a list sounds trivial until you hit version numbers or filenames. The mode you choose changes everything:

Modeitem2, item10, item1 becomesUse for
Alphabeticalitem1, item10, item2Plain words
Naturalitem1, item2, item10Filenames, versions, anything numbered
Numericsorts by the number in each linePure number lists
Lengthshortest → longestFinding outliers, formatting
Shufflerandom (Fisher–Yates)Sampling, randomizing order

Natural sort is the one people don’t know they need: it reads embedded numbers as numbers, so file2 comes before file10: exactly how Windows Explorer and macOS Finder order files. Plain alphabetical sort puts file10 before file2 because “1” precedes “2” character-by-character.

Why your language’s default sort gets this wrong

The natural-sort mode is worth understanding rather than just clicking, because the failure it fixes shows up in code far more often than in text boxes. Every mainstream language’s default string sort is lexicographic, it compares character by character, and '1' sorts before '2', so file10 lands before file2. Paste those two lines above and switch between Alphabetical and Natural to watch it happen.

In JavaScript the difference is one argument:

['file10', 'file2', 'file1'].sort();
// → ['file1', 'file10', 'file2']          lexicographic

const natural = new Intl.Collator(undefined, { numeric: true }).compare;
['file10', 'file2', 'file1'].sort(natural);
// → ['file1', 'file2', 'file10']          what you meant

Intl.Collator with numeric: true is built into every current browser and into Node, and it is almost always the right default for anything a person will read. The shell equivalents are sort -V and ls -v; Python needs a key function, because sorted() has no numeric-aware mode.

Two edge cases worth knowing before you rely on it. Leading zeros compare equal: file02 and file2 are the same number, so their relative order falls back to whatever the collator decides, do not use natural sort to distinguish them. And numbers are compared, not truncated, so v1.9 correctly precedes v1.10; if you have ever seen a release list put 1.10 before 1.9, that was a lexicographic sort.

Deduplication, done right

Removing duplicates keeps the first occurrence of each line and drops the rest. Two settings change the result in ways that surprise people:

  • Case sensitivity: by default Apple and apple count as duplicates (case-insensitive). Turn on case-sensitive comparison to treat them as distinct.
  • Whitespace: a line with a trailing space is not equal to one without, so a “duplicate” may survive. Trim whitespace per line before deduping to catch these invisible mismatches.

The list-to-code workflow

The prefix/suffix/separator trio (see the FAQ) makes this a genuine productivity tool, not just a sorter. Common recipes: wrap a list into quoted JSON array elements, build a SQL IN ('a','b','c') clause from a spreadsheet column, add bullet characters to make a Markdown list, or number lines for a checklist. Because sort and dedupe run first and prefix/suffix apply after, you get clean, deterministic output in one pass.

How big a list can you paste

There is no line limit, because there is no server to impose one, the constraint is your own machine’s memory. Tens of thousands of lines sort without a perceptible pause; at 100,000+ lines you will notice a moment’s work while the collator runs, since natural and case-insensitive sorting compare far more than raw bytes.

Two practical notes for large inputs. Sorting is not done in place: the input field keeps your original order, so a sort you did not want is undone by reading the source column again rather than by re-pasting. And the operations run in a fixed order, trim, then dedupe, then sort, then prefix/suffix, which matters when you are chaining them, because deduplicating before trimming leaves near-duplicates that differ only by a trailing space.


Slugifying titles

The Slugify mode above, or jump straight to it.

What makes a slug work for SEO

A good slug is doing two jobs at once: helping search engines understand the page and making the link clickable for humans. The rules that satisfy both:

DoAvoid
Lowercase onlyMixed case (causes duplicate-URL issues)
Hyphens as separatorsUnderscores, spaces, %20
Target keywords near the frontStop-word filler
Short, a few meaningful words12-word title dumps
ASCII (transliterated)Raw accented/non-Latin characters

Google explicitly treats hyphens as word separators and underscores as word joiners, so my-blog-post is read as three words while my_blog_post is read as one, always use hyphens.

Transliteration: handling non-English titles

A title like “Düşünce Özgürlüğü” or “Café Crème” can’t go into a URL as-is, raw non-ASCII characters get percent-encoded into unreadable %C3%BC soup. This tool transliterates to the closest ASCII equivalents (Turkish ç→c, ş→s, ı→i; German ü→ue, ß→ss; French é→e) so the slug stays clean and shareable. Scripts with no Latin mapping (Chinese, Arabic, Hindi) get stripped, so for those, transliterate to Pinyin or a Romanized form first before generating the slug.

Stop words: trim, but keep meaning

Removing low-value words (the, a, to, in, for) shortens URLs and sharpens the keyword focus, “The Ultimate Guide to SEO in 2026” becomes ultimate-guide-seo-2026. But blindly stripping them can mangle meaning: “To Be or Not to Be” collapses to a useless be-not-be. Disable stop-word removal for titles where every word matters, quotes, song and book titles, proper nouns. The judgment call is yours; the tool just gives you the toggle.

Duplicates and length

Slug generation is deterministic, so two identical titles produce identical slugs, most CMS platforms auto-append -2, -3 to resolve the clash, but if yours doesn’t, differentiate with a distinguishing keyword (python-tutorial-beginners vs python-tutorial-advanced). And mind length: search results display only ~60–70 characters of a URL, so cap long slugs at a word boundary rather than letting them sprawl. For batch work, bulk mode slugifies a whole list of titles at once.

Text Case, Sort & Slug Converter Powered by UseToolSuite: free browser tools

Last updated Built and maintained by Necmeddin Cunedioglu How tools are tested

How helpful was this tool?

Click to rate

Key Concepts

camelCase

A naming convention where words are joined without separators and each word after the first starts with a capital letter (e.g., myVariableName). Used for variables and function names in JavaScript, Java, TypeScript, and Swift. The first letter is always lowercase, distinguishing it from PascalCase.

snake_case

A naming convention where words are separated by underscores and all letters are lowercase (e.g., my_variable_name). It is the standard convention in Python, Ruby, Rust, and database column naming. SCREAMING_SNAKE_CASE (all uppercase) is used for constants.

kebab-case

A naming convention where words are separated by hyphens and all letters are lowercase (e.g., my-class-name). It is the standard for CSS class names, HTML attributes, URL slugs, and npm package names. Also called "spinal-case" or "lisp-case."

PascalCase

A naming convention where every word starts with a capital letter and words are joined without separators (e.g., MyClassName). Used for class names in most programming languages, React component names, and C# method names. Also known as "UpperCamelCase."

Frequently Asked Questions

Does the converter handle multi-word input with mixed separators?

Yes. The converter intelligently detects word boundaries from spaces, hyphens, underscores, and camelCase transitions. So input like "my-variable_name" is correctly split into words before converting to your target case format.

What is the difference between camelCase and PascalCase?

camelCase starts with a lowercase letter (e.g., myVariableName), while PascalCase starts with an uppercase letter (e.g., MyVariableName). camelCase is commonly used for variables and functions, while PascalCase is used for class names in most programming languages.

Can I convert entire paragraphs or just single identifiers?

The tool works best with single identifiers, variable names, or short phrases. While you can input longer text, case conversions like snake_case and camelCase are designed for programming identifiers, not prose.

Does kebab-case conversion preserve numbers?

Yes. Numbers within your input are preserved during conversion. For example, "myVar2Name" converts to "my-var-2-name" in kebab-case, keeping the numeric characters in place.

What is the difference between alphabetical and natural sort?

Alphabetical sort treats all characters as text and sorts strictly by character code: "item1", "item10", "item2", "item20", "item3". Natural sort recognizes embedded numbers and sorts them numerically: "item1", "item2", "item3", "item10", "item20". Use natural sort when your lines contain version numbers, filenames with numbers, or any mixed text-and-number data.

How does duplicate removal work?

When "Remove duplicate lines" is enabled, only the first occurrence of each line is kept and all subsequent duplicates are removed. By default, comparison is case-insensitive (so "Apple" and "apple" are considered duplicates). Enable "Case-sensitive sorting" to treat differently-cased lines as distinct.

What does the separator option do?

By default, the tool splits input by newline characters (one item per line). If your data uses a different delimiter (comma, semicolon, pipe, tab), enter it in the Separator field to split and rejoin by that character instead. For example, entering "," will treat each comma-separated value as a separate item.

How do prefix and suffix work?

Prefix adds a string before each line, and suffix adds a string after each line in the output. This is useful for wrapping lines into code syntax: for example, prefix '"' and suffix '",' converts a plain list into JSON array elements. Prefix/suffix are applied after sorting and deduplication.

Can I undo a sort operation?

The original text remains in the input field, the sort only affects the output. You can always copy from the input field to get the original order. If you want to completely reverse the current line order, use the "Reverse Lines" sort method.

Is there a line limit?

There is no hard line limit since all processing happens in your browser. Performance depends on your device, but modern browsers handle tens of thousands of lines without issues. For extremely large datasets (100K+ lines), processing may take a moment.

What is a URL slug and why does it matter for SEO?

A URL slug is the human-readable part of a URL that identifies a specific page, for example, "my-blog-post" in example.com/blog/my-blog-post. Well-crafted slugs improve SEO because search engines use URL keywords as a ranking signal, and users are more likely to click on links with clear, descriptive URLs. A good slug is lowercase, uses hyphens as word separators, contains target keywords, and avoids stop words and special characters.

Does this tool support non-English characters like Turkish, German, or Russian?

Yes. The tool includes a built-in Unicode transliteration engine that converts characters from 10+ languages to their closest ASCII equivalents. For example: Turkish ç→c, ğ→g, ş→s, ı→i; German ä→ae, ö→oe, ü→ue, ß→ss; French é→e, ê→e; Russian а→a, б→b, and so on. Characters without a direct mapping are processed through Unicode NFD normalization to strip diacritical marks as a fallback.

Should I use hyphens or underscores in URL slugs?

Google officially recommends hyphens (-) over underscores (_) in URLs. Google treats hyphens as word separators, meaning "my-blog-post" is read as three separate words. Underscores are treated as word joiners, so "my_blog_post" is read as one compound word. For maximum SEO benefit, always use hyphens as your URL separator.

What are stop words and should I remove them from slugs?

Stop words are common, low-meaning words like "a", "an", "the", "is", "in", "on", "for", "and", "with". Removing them from slugs makes URLs shorter and more keyword-focused. For example, "The Ultimate Guide to SEO in 2024" becomes "ultimate-guide-seo-2024" instead of "the-ultimate-guide-to-seo-in-2024". Shorter URLs are easier to read, share, and remember. However, sometimes stop words add meaning, use your judgment.

Can I generate multiple slugs at once?

Yes. Enable Bulk Mode to process multiple lines of text simultaneously, each line is converted into a separate slug. This is useful when generating slugs for a list of blog post titles, product names, or page headings. Paste your list with one title per line and get all slugs at once.

How does the tool detect words in a string without separators?

The converter splits on three signals: explicit separators (spaces, hyphens, underscores), lowercase-to-uppercase transitions (helloWorld → hello + world), and letter-to-digit boundaries. This means it can correctly re-case helloWorld2User regardless of which convention it started in.

How are acronyms like API or URL handled when converting case?

Consecutive capitals are treated as a single word, so parseURLPath splits into parse + URL + path. When converting to camelCase or PascalCase the acronym is normalized (parseUrlPath), matching the style most linters and style guides, including Google's and Microsoft's, recommend for identifiers.

Why do accented or non-English words sort in a strange order?

Pure character-code (ASCII/Unicode) sorting orders by the numeric value of each character, which doesn't match how a human or a dictionary expects words to sort. All uppercase letters come before all lowercase ('Z' before 'a'), and accented letters (é, ö, ñ) sit far away in the Unicode table, so they land after 'z' instead of next to their base letter. Languages also have their own rules, in Turkish, 'ı' and 'i' are distinct letters with a specific order. For human-friendly ordering, you want locale-aware (collation) sorting rather than raw code-point sorting; enabling case-insensitive comparison fixes the most jarring upper/lower issue, and for serious multilingual sorting, normalize or use a locale-aware collator.

How do I turn a plain list into a JSON array or a SQL IN-clause?

Use the prefix, suffix, and separator options together, they're built for exactly this. To make a JSON array of strings, set the prefix to a double-quote and the suffix to a quote-plus-comma, so each line becomes "item", and wrap the result in [ ]. For a SQL IN-clause, the same pattern produces 'item', 'item', 'item' to drop inside IN (...). Combine with deduplication to remove repeats and with sorting to make the output deterministic. This turns the tool into a quick list-to-code converter, paste a column from a spreadsheet, and get a ready-to-paste array or clause in seconds.

Should I ever change a slug after publishing?

Avoid it whenever possible, a published URL is an asset. Changing a slug breaks every existing link to that page (other sites, social shares, bookmarks, your own internal links) and discards the SEO authority the old URL accumulated, which can tank its rankings. If you absolutely must change it (a bad typo, a rebrand), set up a 301 redirect from the old slug to the new one. A 301 passes most of the link equity to the new URL and keeps existing links working. The cleanest strategy is to get the slug right before publishing and then leave it alone.

Should I put dates or categories in the slug?

Generally no, keep slugs short, stable, and keyword-focused. Dates in URLs (/2024/03/my-post) make content look stale the moment the year turns and force a redirect if you ever update and 'refresh' the piece. Category paths (/blog/seo/my-post) break the moment you recategorize an article, again requiring redirects. Both also lengthen the URL without adding ranking value. Prefer a flat, descriptive slug (/my-post or /blog/my-post) that won't need to change when the content's date or category does. Stability is worth more than cleverness in a URL.

Related Guides

Related Tools

Embed this tool on your site

Paste this snippet into any HTML page or blog post to embed a live, fully working copy of Text Case, Sort & Slug Converter. Free for any use.