Collapse whitespace
Replace multiple spaces with single spaces when preparing user input for database storage or slug generation.
Different ecosystems standardize on specific casing conventions. Reformatting strings quickly prevents typos when moving data between languages, databases, or front-end frameworks.
| Style | Example | Popular usage |
|---|---|---|
| camelCase | myVariableName |
JavaScript variables, JSON keys |
| PascalCase | MyVariableName |
TypeScript/Java class names, C# methods |
| snake_case | my_variable_name |
Python constants, PostgreSQL columns |
| kebab-case | my-variable-name |
CSS classes, file slugs, static site URLs |
Clean strings before sending them to other systems. Consistent formatting prevents bugs in API payloads, command-line utilities, and commit messages.
Replace multiple spaces with single spaces when preparing user input for database storage or slug generation.
Convert between Windows (\r\n) and Unix (\n) endings to prevent diff noise across platforms.
Normalize to NFC or strip emoji when integrating with legacy systems that only accept ASCII.
The JavaScript example returns hello_world. The Python example returns helloWorldExample. These are different naming conventions; compare with the format your application expects.
function toSnakeCase(value) {
return value
.trim()
.replace(/[\s_-]+/g, ' ')
.toLowerCase()
.replace(/[^\w\s]/g, '')
.replace(/\s+/g, '_');
}
console.log(toSnakeCase('Hello World!'));
import re
def to_camel_case(value: str) -> str:
words = re.sub(r'[\s_-]+', ' ', value.strip()).split()
if not words:
return ''
first, *rest = words
return first.lower() + ''.join(word.capitalize() for word in rest)
print(to_camel_case('Hello world example'))
camelCase starts with a lowercase character while PascalCase capitalizes every word. Both remove spaces for compact variable and type names.
Choose snake_case for Python, SQL, and configuration files. Prefer kebab-case for web assets such as CSS classes, file slugs, or static routes.
No. Transformations run entirely in the browser, so sensitive snippets, API keys, or credentials remain private.
Use the whitespace action to collapse runs of whitespace. This changes line breaks too; keep the original if paragraph boundaries matter. It is not a lossless line-ending converter.
Yes. Copy the provided JavaScript or Python snippets to integrate case conversion into build scripts, data pipelines, or editor extensions.
Protect text with AES-GCM and PBKDF2 tokens that stay on-device.
Generate MD5, SHA-1, and SHA-256 digests locally with Web Workers.
Convert any text to or from Base64 without leaving your browser.
Decode claims and verify HMAC signatures without network calls.
Validate, format, and diff JSON without network calls.
Format, minify and convert XML to JSON locally.
Experiment with regular expressions and capture groups locally.
Encode components and inspect query parameters locally.
Create collision-resistant UUID v4 identifiers using Web Crypto.
Build strong passwords with custom length, charset, and entropy.
Convert Unix timestamps into local, UTC and ISO dates.
Switch between HEX, RGB, HSL, and Tailwind palettes instantly.
Design QR codes for text, Wi-Fi, contacts, email, or SMS locally.
Generate EAN and Code 128 barcodes and download crisp PNG output.
Look up your public IP using disclosed external services.
Produce paragraphs, lists, and markdown filler text fast.
Compress JPG, PNG, WebP and AVIF images to a target size in your browser. Preview results, process batches and download images individually or as a ZIP.
Convert WebP and AVIF images to JPG or PNG locally. Batch convert supported images, control quality and transparency, preview results and download a ZIP.
Convert JSON and NDJSON to CSV for Excel, or CSV to JSON, locally. Flatten nested objects, choose columns and delimiters, and download UTF-8 results.
Decode Base64 or data URIs to an image preview and download, or encode an image file to Base64. Inspect dimensions and size without uploading your image.
Convert HEIC and HEIF photos to JPG or PNG in your browser. Choose quality, preview converted images and download individual photos or a batch ZIP.
Decode Base64 to PDF locally, preview pages with zoom and navigation, and download the decoded PDF. Supports raw Base64 and application/pdf data URIs.
Run the AES interoperability guide or read how these tools are checked.