Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Nifty Text: Change Case, Sort Lines, Align & EncodeNew to Visual Studio Code? Get it now.
Nifty Text: Change Case, Sort Lines, Align & Encode

Nifty Text: Change Case, Sort Lines, Align & Encode

Nifty

| (0) | Free
Change case, sort and dedupe lines, align on = : , or |, encode and decode Base64, URL and HTML, hash, number sequences and UUIDs across cursors. One Transform list for all.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Nifty Text

Change case, sort and dedupe lines, align on = : , or |, encode and decode Base64, URL and HTML, hash, number sequences and UUIDs across cursors. One Transform list for all.

Maintained. No sign-in. No telemetry. Works in VS Code, Cursor, Windsurf, VSCodium and other editors that use Open VSX.

Features

snake_case keys turned into camelCase without touching the strings, then aligned on the colon

The Transform list, filtered to the sort commands

Lines sorted in natural order and a Markdown table formatted with its column alignment

A number sequence inserted at four cursors

  • One list for everything. Nifty Text: Transform… (also in the editor's right-click menu, and a click on the counts in the status bar) lists all 57 transforms. Type a few letters to filter; the ones you used last are at the top.
  • Works with multiple cursors. Every command works on each selection, and one undo takes it all back. With an empty cursor, case commands change the word under it and encoders use the line.
  • Change case: camelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE, kebab-case, dot.case, path/case, Title Case, Sentence case, UPPER, lower, sWAP, and Cycle Case, which steps camel → snake → SCREAMING → kebab → Pascal. XMLHttpRequest becomes xml_http_request, _private keeps its underscore. Select a phrase ("user id") to get one identifier; select a line of code to convert every identifier on it, leaving string literals alone. Title Case keeps small words (of, the, and) lower case.
  • Sort lines: natural (a2 before a10), descending, ignoring case, by the first number on the line, by length, by a column (split on spaces or on a separator you type) or by a regex capture group. Also reverse, shuffle and sort with duplicates removed. Select nothing to sort the whole file (the final newline stays last). With several cursors, the selected words or the lines under the cursors are sorted among themselves.
  • Clean up lines: remove duplicates (keeping the first; optionally ignoring case), keep or remove lines matching a regex, remove blank lines, trim, join with a separator, split at a separator, reverse characters (emoji and accents stay whole).
  • Align: on the first = (with +=, :=, ??= and friends, skipping ==, <= and =>), on : (keys stay next to their colon, values line up; :: and URLs are skipped), on =>, on every comma, or on any separator you type. With no selection, the block of neighbouring lines around the cursor is aligned. Separators inside strings are ignored and CJK text is measured as double width. Format Markdown Table pads the cells and keeps :--, --: and :-: alignment. Align Cursors pads so all cursors land in the same column.
  • Encode and decode: Base64 (UTF-8; URL-safe input is accepted), URL (encodeURIComponent), HTML entities (named and numeric), Unicode escapes (é, \u{1F600}, \x41), JSON string escapes and hex bytes. Invalid input gives a clear message and changes nothing. Decode JWT opens the header and payload beside the editor, with exp/iat as dates (the signature is not checked).
  • Hashes: MD5, SHA-1 and SHA-256 of the selection, as hex.
  • Insert at every cursor: a sequence (1, 10 5 for a step of 5, 001 for zero padding, 0x0A for hex, a for letters, item-{01} as a template) numbered from the top of the file down, or a fresh UUID per cursor.
  • Counts in the status bar: words, lines and characters in the selection (CJK characters count as words).
  • Works in the browser on vscode.dev and github.dev.

Next to other Nifty extensions

  • Nifty Replace changes case inside a find-and-replace across files (\U$1); Nifty Text works on the text you have selected.
  • Nifty JSON escapes a selection into a quoted JSON string; Nifty Text's JSON escape works at every cursor and leaves the quotes to you.
  • Nifty Snippets applies case changes to snippet variables as you insert them, and Nifty Macros replays keystrokes. Both combine well with these commands.

Commands

All commands are in the Command Palette under Nifty Text. The ones that ask for input (a separator, a column, a regex or a start number) also take it as an argument, so you can bind them to keys:

{ "key": "ctrl+alt+n", "command": "nifty.text.insertSequence", "args": "1" }
Command What it does
Nifty Text: Transform… Pick any transform from one filtered list
To camelCase, To PascalCase, To snake_case, To SCREAMING_SNAKE_CASE, To kebab-case, To dot.case, To path/case, To Title Case, To Sentence case, To UPPER CASE, To lower case, Swap Case, Cycle Case Change case
Sort Lines, Sort Lines Descending, Sort Lines, Ignoring Case, Sort Lines by Number, Sort Lines by Length, Sort Lines by Column…, Sort Lines by Regex…, Sort Lines and Remove Duplicates, Reverse Lines, Shuffle Lines Sort
Remove Duplicate Lines, Remove Duplicate Lines, Ignoring Case, Keep Lines Matching…, Remove Lines Matching…, Remove Blank Lines, Trim Lines, Join Lines…, Split Lines at…, Reverse Characters Clean up lines
Align on =, Align on :, Align on =>, Align on Commas, Align on…, Format Markdown Table, Align Cursors Align
Base64 Encode/Decode, URL Encode/Decode, HTML Encode/Decode, Unicode Escape/Unescape, JSON String Escape/Unescape, Hex Encode/Decode, Decode JWT Encode and decode
MD5 Hash, SHA-1 Hash, SHA-256 Hash Replace the selection with its hash
Insert Sequence…, Insert UUID Insert at every cursor

Settings

Setting Default What it does
nifty.text.statusBar true Show word, line and character counts for the selection
nifty.text.case.skipStrings true When changing the case of a line of code, leave string literals alone
nifty.text.recentCount 5 How many recently used transforms to list first

Install

  • VS Code: search for "Nifty Text" in the Extensions view, or install from the Visual Studio Marketplace.
  • Cursor, Windsurf, VSCodium, Kiro, Antigravity: install from Open VSX.

Privacy

This extension collects no telemetry and needs no account.

More Nifty tools

  • Nifty Beautify: Format HTML in PHP, Blade & Twig: Format HTML inside PHP, Blade, Twig, Jinja, Handlebars, ERB and Liquid templates without breaking the template tags. (Open VSX)
  • Nifty Format on Save: Toggle, Exclude & Chains: Control format on save: a status bar toggle, folders and files that are never formatted, time limits, and save chains like organize imports, ESLint fix, then format. (Open VSX)
  • Nifty JSON: Formatter, Validator & JSONPath: Format, minify, sort keys, query with JSONPath, copy paths, generate TypeScript types, and browse huge JSON files in a fast tree view. (Open VSX)
  • Nifty Markdown: TOC, Lists, Shortcuts & Paste: Markdown editing that keeps up: table of contents, section numbers, smart lists and task toggles, formatting keys, image paste, link checks and completions, and math in the preview. (Open VSX)
  • Nifty Rewrap: Hard-Wrap Comments & Markdown: Alt+Q rewraps the comment, docstring or Markdown paragraph at the cursor to your ruler, keeping comment markers, JSDoc tags and list indents. Optional auto-wrap while typing. (Open VSX)
  • Nifty SQL: SQL Formatter for 20 Dialects: Format SQL in 20 dialects, including dbt and Jinja templates, with your team's settings. (Open VSX)

See all 100+ Nifty extensions and web tools at https://getnifty.dev

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft