Category: Free Tools

  • SVG Pattern Generator: Tileable Backgrounds [2026]

    SVG Pattern Generator: Tileable Backgrounds [2026]

    TL;DR: An SVG pattern generator outputs tileable SVG graphics — repeating shapes (dots, triangles, hexagons, lines, scales) that can be used as background-image fills. SVG patterns scale infinitely, accept custom colors via CSS variables, and produce smaller payloads than equivalent PNG tiles for most cases. Our free SVG pattern generator ships 60+ tested shapes, exports as standalone SVG, PNG raster, or CSS data URL — ready to drop into any stylesheet.

    For repeating decorative backgrounds, the choice in 2026 is between three approaches: pure CSS gradients (smallest, geometric only), SVG patterns (vector-perfect, complex shapes), or PNG tiles (legacy fallback). SVG wins when your shape is anything more complex than dots and stripes — hexagonal grids, isometric blocks, scaled fish-scales, abstract logos repeated. SVG patterns are also CSS-variable-friendly: change a single CSS custom property and the entire tiled pattern re-colors without regenerating the asset.

    Our SVG pattern generator ships 60+ tested patterns with size, color, and density controls. Outputs three forms: standalone .svg file (use as background-image: url(...)), Base64 data URL (inline in CSS), or PNG export (legacy fallback). Patterns are seamless — the right edge meets the left edge cleanly, the top meets the bottom — so any tile size repeats without visible seams. This guide explains how SVG patterns are constructed, when SVG beats CSS or PNG, and the gotchas with anti-aliasing at tile boundaries.

    SVG vs CSS vs PNG patterns

    Approach File size Best for
    CSS gradient ~80 bytes Dots, lines, stripes, simple grids
    SVG pattern 300-1500 bytes Triangles, hexagons, complex shapes, custom logos
    PNG tile 2-15 KB per tile Photographic textures, complex non-geometric

    If your pattern can be expressed as gradients (dots, lines, grids), use CSS — smallest payload. If it’s geometric but more complex than gradients allow (triangles, hexagons), use SVG. If it’s photographic or organic (paper texture, fabric weave), use PNG.

    SVG pattern anatomy

    A typical SVG pattern is a repeating tile defined inside a <defs> block, then referenced as a fill:

    <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
      <defs>
        <pattern id="dots" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse">
          <circle cx="10" cy="10" r="2" fill="#635BFF"/>
        </pattern>
      </defs>
      <rect width="100%" height="100%" fill="url(#dots)"/>
    </svg>

    The <pattern> element defines a 20×20 tile with a single circle at the centre. The outer rectangle fills the entire SVG with that pattern. Change pattern dimensions, fill colour, or geometry — the pattern updates automatically.

    How to generate an SVG pattern

    1. Open the SVG pattern generator
    2. Pick a shape from the gallery (60+ options across 5 categories)
    3. Adjust tile size, foreground color, background color, and density
    4. Watch the live preview render the seamless tile
    5. Export: standalone SVG file, Data URL (CSS-ready), or PNG rasterized at chosen resolution

    Using SVG patterns as CSS backgrounds

    Two ways to include an SVG pattern in CSS:

    • External file: background: url("/patterns/dots.svg") repeat; — saves a separate request, cacheable, scales with browser zoom.
    • Inline data URL: background: url("data:image/svg+xml;utf8,<svg...>") repeat; — no extra request, theme-able with CSS variables.

    For one-off patterns, inline data URLs save a round-trip; for patterns reused across many pages, external files cache better. For maximum flexibility, use a CSS variable for the pattern’s primary color: the data URL references it via fill="currentColor" or accepts injected colors via background-image stacking.

    60+ shapes shipped with the generator

    • Dots: uniform grid, scattered, halftone, polka, large/small mix
    • Triangles: equilateral, scalene, isometric grid, chevron, sawtooth
    • Hexagons: honeycomb, beehive, isometric, soccer-ball-style
    • Lines: diagonal, crosshatch, sketchy, double-line, wave
    • Scales: fish, dragon, oversized, miniature
    • Geometric: circles, squares, plus signs, asterisks, stars, arrows
    • Floral: abstract flower tile, art-deco fan
    • Tech: circuit traces, schematic, blueprint grid

    Common gotchas

    • Anti-aliasing at seams. If your shape touches the edge of the tile, anti-aliasing can produce visible vertical or horizontal lines where tiles meet. Add 1px padding inside the tile (so shapes don’t touch the edge) or use SVG’s shape-rendering: crispEdges.
    • Data URLs need careful escaping. Inline SVG in CSS data URLs needs URL encoding (%, #, ", etc.). Use ? as a safe alternative for < if your CSS toolchain breaks. Our generator outputs already-escaped data URLs.
    • Vector but not infinite. SVG patterns scale with display zoom but the pattern tile size is fixed in the generator output. To make tiles scale with viewport, use CSS background-size: 5vw 5vw or similar — but that distorts the pattern.
    • Custom fonts in patterns don’t work. If your pattern uses text glyphs (e.g., a tiled “★” character), include the font definition inline via @font-face in the SVG itself, or use SVG path data for the character. External font files won’t load in SVG-as-image contexts.
    • Pattern size affects performance. Tiny tiles (under 8×8) render slower than larger ones because the GPU has to repeat them more times. For very fine patterns, use a 32×32 tile with multiple instances inside.
    • Background-attachment: fixed + SVG patterns. Patterns repeat strangely with background-attachment: fixed on some browsers. Test before deploying parallax-style background effects.

    When NOT to use an SVG pattern

    For simple geometric patterns (dots, lines, grids), use CSS gradients — smaller payload, same effect. For photographic or organic textures (paper, fabric, watercolor), use a PNG with proper compression. For animated patterns (drifting, morphing), use a CSS animation on the SVG itself or a canvas-based approach. For very large patterns where the tile is 1000×1000+, you’re better off with a real image — at that size SVG offers no advantage over PNG. For extremely tight performance budgets, even a small SVG pattern adds 500–1500 bytes; CSS gradients add 80.

    Frequently asked questions

    Are SVG patterns faster than PNG?

    For most simple shapes: yes, smaller and faster. For very complex patterns or photographic-quality textures: no, PNGs (especially WebP or AVIF) compress better. Rule of thumb: if the pattern is geometric, SVG; if it’s organic, raster.

    Can I edit the SVG pattern after generating?

    Yes — the output is plain SVG markup. Open in any text editor, change fill values, adjust shapes inside the <pattern>, scale the tile dimensions. Or import into Figma / Illustrator / Inkscape for visual editing.

    Will the pattern look the same on retina displays?

    Yes — SVG is vector, so it renders pixel-perfect at any DPI. PNG patterns need 2× / 3× variants for retina; SVG doesn’t.

    Can I use CSS variables for pattern colors?

    Inside an SVG file referenced via external URL, CSS variables don’t propagate. For inline data URLs in your CSS, use currentColor in the SVG fills, then set color on the parent element to control the pattern’s primary color. For full theme support, generate the pattern programmatically and inject CSS variable values.

    Is my data uploaded?

    No. The generator runs in your browser. Pattern selections, customisations, and the generated SVG/PNG/data URL stay on your device.

    Can I use these patterns commercially?

    Yes — the generated SVG is your output, no attribution required. The shape templates are designed for any use including commercial work. The exception: if you upload your own custom shape and the original asset has licensing restrictions, those carry over to the generated pattern.

    Related tools and guides

     

  • SVG Blob Generator: Random Organic Shapes [2026]

    SVG Blob Generator: Random Organic Shapes [2026]

    TL;DR: An SVG blob generator creates organic, asymmetric shapes — like rounded amoeba silhouettes — using randomised cubic Bezier curves around a circle. Used as decorative backgrounds, hero accents, sticker-style highlights, and avatar masks. Our free SVG blob generator ships a complexity slider, randomness control, gradient fills, and a seed value so you can re-generate the exact same blob later — plus PNG export with transparent background.

    Blobs are the visual mascot of late-2010s design — the Stripe, Notion, and Headspace school of organic shapes that fill awkward white space without looking like clip art. They work because the eye reads them as friendly and distinct from the rectangles that make up most of a UI. The trick is producing random-but-not-too-random curves: too uniform and the blob looks like a cookie-cutter circle; too chaotic and it looks like an inkblot.

    Our SVG blob generator uses a noise-perturbed circle algorithm — start with N evenly-spaced points around a circle, perturb each radius by a controlled amount of noise, and connect the points with smooth cubic Bezier curves. Adjust complexity (number of points, 3 to 12) and randomness (how much each point can move). Lock a seed value to reproduce the exact shape, or shuffle for a fresh variation. Outputs SVG (preferred for scaling) or PNG with transparent background.

    When blobs work — and when they don’t

    Use case Blob OK? Notes
    Hero section accent / background shape Yes The classic 2018-2024 Stripe / Notion look
    Decorative backdrop behind text Yes (with low opacity) Keep contrast above WCAG threshold
    Avatar mask Yes Used as clip-path: path() for image cropping
    Brand logo No Random shapes can’t be reproduced consistently
    Icon set No Use shape primitives or hand-drawn SVGs
    Fintech / serious B2B UI Maybe Trends suggest the look is fading — verify against your brand

    How blob shapes are generated (the algorithm)

    The simplest blob algorithm: pick N points evenly around a circle (e.g., N=8 means one point every 45°), add or subtract a random amount from each point’s radius (e.g., ±15%), then connect the points with a smooth Catmull-Rom or cubic Bezier spline. The result is a closed organic shape.

    Two parameters control the look:

    • Complexity (point count): 3–4 produces simple organic shapes; 6–8 the typical “blob” appearance; 10–12 starts to look bumpy. Higher counts approach a circle.
    • Randomness (radius variance): 0% returns a perfect circle; 15% gives the typical Stripe-style blob; 50%+ produces dramatic, almost star-like shapes; 80%+ gets weird.

    The “seed” is the random number generator initial value. Same seed + same parameters always produces the same blob — useful for reproducible designs and storing a specific shape in a stylesheet.

    How to generate a blob in your browser

    1. Open the SVG blob generator
    2. Adjust complexity (points), randomness (variance), and size
    3. Pick fill — solid colour, linear gradient, or radial gradient
    4. Click Shuffle for a new random shape, or paste a seed string for a specific one
    5. Click Copy SVG for inline use, Download SVG for asset library, or Download PNG for legacy systems

    SVG output anatomy — what you’ll paste

    <svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
      <path
        d="M150,100 C170,140 130,180 100,170 C70,180 30,150 30,100 C20,60 60,30 100,30 C140,20 160,60 150,100 Z"
        fill="#635BFF"
      />
    </svg>

    The viewBox="0 0 200 200" defines a coordinate system; the actual rendered size is set by CSS or the width/height attributes. Inline the SVG to style the blob with CSS variables, or reference an external file via <img src="blob.svg">.

    Common gotchas

    • Don’t animate blob shape directly. CSS animation between two SVG paths needs equal point counts; otherwise the morph fails or looks broken. Use the same complexity for the start and end blob, only varying the seed.
    • Fill colour vs stroke colour. Most decorative blobs use only fill (no border). If you add a stroke, the path must be closed (ending in Z) — the generator handles this, but custom-edited blobs may render with a thin gap.
    • SVG sizing pitfalls. Set width and height via CSS (.blob { width: 100%; height: auto; }) — hard-coded width/height attributes don’t scale with parent containers.
    • Gradients need <defs>. Linear and radial gradients in SVG live inside a <defs> element and reference an ID. Generated SVG includes the defs — but if you copy only the path and forget the gradient definition, the blob renders solid black.
    • Same seed across browsers. JavaScript’s Math.random() isn’t seeded by default, so two browsers running the same generator can produce different blobs. We use a seedable PRNG (xoroshiro128+) for reproducibility.
    • Blob trends fade. The blob aesthetic peaked around 2020. By 2026 some brands are returning to grids, geometric patterns, or gradient meshes. Don’t blob everything — use sparingly as one design element among many.

    When NOT to use a blob

    For a brand identity (logo, mark, lockup), don’t use random blobs — your brand needs a consistent shape that can be reproduced exactly across business cards, app icons, billboards, and embroidery. For functional UI shapes (modal corners, button radii, container shapes), use plain border-radius or clip-path with named values — blobs are too distracting for primary UI elements. For animations between many shapes, use a dedicated motion library (Framer Motion, GSAP) with proper SVG morph plugins. For data visualisation, blobs are decoration, not data.

    Frequently asked questions

    Can I edit the blob after generating?

    Yes — the SVG path is just a string of cubic Bezier commands. Edit the d attribute manually for fine-tuning, or import the SVG into Figma / Illustrator / Inkscape for visual editing. To re-randomise within the generator, change the seed.

    Will the same seed produce the same blob across browsers?

    Yes — we use a deterministic PRNG (xoroshiro128+), so the same seed and same parameters produce identical SVG everywhere. Useful for reproducible designs.

    Can I animate between two blobs?

    Yes, but both blobs must have the same point count for smooth interpolation. Generate both with the same complexity setting and only change the seed; the animator can morph between the two paths. CSS path animations or libraries like GSAP MorphSVG handle this.

    Should I use SVG or PNG?

    SVG for web — vector scales without loss, has CSS-controllable fill, and is tiny (often under 1 KB). PNG for legacy systems that don’t render SVG (some older email clients, very old CMS plugins). PNG output is rasterised at 2× resolution by default for retina displays.

    Is my data uploaded?

    No. The generator runs in your browser. The blob shape, seed, and exported SVG/PNG never leave your device.

    Can I use blobs in print or for stickers?

    Yes — SVG scales infinitely, perfect for stickers, business cards, or large-format print. Convert to PDF or AI in your design tool of choice; the source SVG paths are widely supported.

    Related tools and guides

     

  • Case Converter: Switch Text Between 12 Cases [2026]

    Case Converter: Switch Text Between 12 Cases [2026]

    TL;DR: A case converter switches text between UPPERCASE, lowercase, Title Case, Sentence case, and 8+ programming cases (camelCase, snake_case, kebab-case, PascalCase, CONSTANT_CASE, dot.case, path/case, Train-Case). Our free case converter handles all 12 in your browser, preserves Unicode (accented characters, emoji, non-Latin scripts), and copies output with one click.

    Switching letter case is the kind of micro-task that interrupts every writer and developer about a dozen times a week. You paste a tweet that came back UPPERCASE FROM A SCREAMING REPLY and need it back to sentence case. You name a CSS file and need my-component-styles.css instead of MyComponentStyles.css. You copy a section heading from a PDF that arrived in InCoNsiStEnT mIxEd CaSe. Word and Google Docs handle the basics (Shift+F3 in Word; Format → Text → Capitalization in Docs), but neither covers the programming cases developers reach for daily.

    Our case converter handles 12 case types in one tool, runs entirely in your browser, and gets the edge cases right (locale-aware Turkish dotted-I, ligatures, accented characters, mixed-script content). This guide explains every case, when to use which, the gotchas the obvious tools miss, and the keyboard-shortcut alternatives that fail on programming cases.

    All 12 case types and when to use each

    Case Example When to use
    UPPERCASE HELLO WORLD Headings in caps style guides, acronyms, SQL keywords
    lowercase hello world Email addresses, URLs, hashtags, casual UI labels
    Title Case Hello World From Mars Headings in AP/Chicago style; book and article titles
    Sentence case Hello world from mars Modern UI copy (Google, GitHub, Apple HIG since 2015)
    camelCase helloWorldFromMars JavaScript variables, JSON keys, Java methods
    PascalCase HelloWorldFromMars Class names (TypeScript, C#, Python), React components
    snake_case hello_world_from_mars Python variables, Ruby methods, PostgreSQL columns
    CONSTANT_CASE HELLO_WORLD_FROM_MARS Environment variables, language constants, enums
    kebab-case hello-world-from-mars URLs, CSS class names, npm packages, file names
    Train-Case Hello-World-From-Mars HTTP headers (Content-Type, X-Forwarded-For)
    dot.case hello.world.from.mars i18n keys, Java packages, namespaced configs
    iNVERSE cASE hELLO wORLD FROM mARS Fixing a CapsLock-on paragraph; novelty effect

    Title Case is the most misunderstood case

    Title Case looks simple — capitalise the important words — but the major style guides disagree on which words count. AP Style capitalises words of 4+ letters; Chicago Style capitalises 5+ letters and treats is, be, are as significant; APA Style capitalises any word longer than 3 letters; MLA Style capitalises the first and last word regardless of length, plus all major words. The result: the same headline can be valid Title Case under one guide and incorrect under another.

    Our converter follows AP Style by default (the most common guide for web headlines and blog posts) and lowercases articles (a, an, the), short prepositions (at, by, in, of, on, to, up), and short conjunctions (and, but, or, nor, for, so, yet). The first and last word are always capitalised regardless. If you need Chicago or APA, use Title Case as a starting point and manually adjust the borderline words — typically 1-2 per headline.

    How to convert text case in your browser

    1. Open the case converter
    2. Paste or type your text in the input box
    3. Click any of the 12 case buttons — output appears instantly
    4. Click Copy to copy to clipboard, or Download .txt for long text
    5. Optional: tick the AP/Chicago/MLA selector for Title Case style preference

    The Turkish dotted-I problem (and other Unicode gotchas)

    Naive case conversion (str.toUpperCase() in JavaScript without a locale) breaks for Turkish and Azerbaijani. The Turkish alphabet has two distinct letters: I (uppercase, no dot) and İ (uppercase, with dot). Lowercase i uppercases to İ; lowercase ı (dotless i) uppercases to I. Default JavaScript ignores this and produces I for both, corrupting Turkish text.

    Our converter uses toLocaleUpperCase() and toLocaleLowercase() with an auto-detected locale, so istanbulİSTANBUL in Turkish content (correct) rather than ISTANBUL (wrong). Similar fixes apply to German ß (uppercases to SS in modern Unicode, or to if you prefer the new capital eszett), Greek final sigma ς (lowercases differently from middle σ), and Lithuanian dotted letters.

    Common gotchas

    • Acronyms in Title Case. Most converters lowercase acronyms in Title Case (Nasa Launches Probe). Our tool preserves all-caps tokens of 2-5 letters as acronyms (NASA Launches Probe).
    • Hyphenated words. Title Case style guides disagree on capitalising the second part of a hyphenated word. AP capitalises both (State-Of-The-Art); Chicago lowercases the second part for closed compounds (State-of-the-art). Pick one and be consistent.
    • Programming cases on existing camelCase. Converting parseHTMLString to snake_case requires detecting the acronym boundary. Naive splitters produce parse_h_t_m_l_string; our converter outputs parse_html_string.
    • Numbers in slugs. kebab-case for URLs should preserve digit boundaries. iPhone16Pro becomes i-phone-16-pro, not iphone16pro. Search-engine readability matters.
    • Sentence case across multiple sentences. Sentence case capitalises the first letter of every sentence, not just the first letter of the whole input. Single-period detection is fragile (abbreviations like Mr. trip naive converters); our tool uses Intl.Segmenter for proper sentence boundaries.

    When NOT to use a case converter

    For one-off Microsoft Word edits, the built-in Shift+F3 cycle (Lowercase → UPPERCASE → Title Case) is faster than switching tabs. For programmatic conversion of large datasets, libraries like change-case (npm) or inflection (Python/Ruby) belong in your build pipeline, not a browser tab. And for reformatting text that needs editorial judgment — like fixing a paragraph that mixes proper nouns with sentence-case errors — a human editor will always beat any automated rule.

    Frequently asked questions

    Is the conversion case-sensitive across languages?

    Yes. Our converter uses locale-aware Unicode rules so Turkish dotted-I, German eszett, Greek final sigma, and Lithuanian dotted letters round-trip correctly. For most Latin-script content the default works; for Turkish or Azerbaijani text you can manually pick the locale to force the correct mapping.

    Does Title Case follow AP, Chicago, or MLA?

    Default is AP Style (lowercase articles, short prepositions, and short conjunctions; capitalise everything else). A dropdown lets you switch to Chicago or APA, which differ on the cutoff length for prepositions. MLA capitalises the first and last word always — our converter applies that rule under all three options.

    How do I convert camelCase to snake_case correctly?

    Paste the camelCase text and click snake_case. The converter detects boundaries on uppercase letters, preserves runs of acronyms (parseHTMLStringparse_html_string, not parse_h_t_m_l_string), and handles digit boundaries (iPhone16i_phone_16).

    What’s the difference between Title Case and Capitalized Case?

    Capitalized Case (sometimes called “Initial Caps”) capitalises the first letter of every word including articles and prepositions. Title Case follows a style guide and lowercases small words like and, the, of. Capitalized Case is rare in modern publishing; almost every editorial style uses true Title Case or sentence case.

    Is my text uploaded?

    No. The case converter runs in your browser via JavaScript. Your text is never uploaded, logged, or stored on our servers. You can verify this in your browser’s Network tab — clicking a case button generates zero outbound requests.

    Can I batch-convert a file or column of values?

    Yes. Paste any size text up to your browser’s memory limit (effectively several MB on a modern device). For each line you can convert independently by checking “Per-line” mode, useful for converting a column of CSV values without merging them into one paragraph.

    Related tools and guides

     

  • Character Counter: Live Word & Letter Count [2026]

    Character Counter: Live Word & Letter Count [2026]

    TL;DR: A character counter shows how many characters, words, sentences, and paragraphs are in any text — with live limits for tweets (280), meta descriptions (155), SMS (160), and other constrained writing contexts. Our free character counter updates as you type, highlights when you cross a limit, and runs entirely in your browser.

    Writers, marketers, and students count characters constantly. Tweet limit is 280; meta description is ~155; SMS message before splitting is 160; LinkedIn post for maximum reach is ~1,300; YouTube title is 60. Almost every text-based platform imposes a length constraint that shapes what you can say. A character counter that shows the count live as you type — with the right limits for your context — turns “did I cross the limit?” guesswork into instant feedback.

    Our character counter reports characters (with and without spaces), words, sentences, paragraphs, and reading time. Hit a preset limit and the relevant counter turns red. Useful for the dozen contexts every writer juggles per week. This guide covers the standard length limits, the difference between character and letter counts, and the platform-specific gotchas (Twitter counts URLs as 23 characters; SMS uses GSM-7 vs UCS-2 character sets).

    Standard length limits across platforms

    Platform / Use Limit Notes
    Twitter / X post 280 chars (Twitter Blue: 4,000) URLs count as 23 chars regardless of length
    Meta description ~155 chars Google truncates with “…” in mobile SERP
    Page title (SEO) ~60 chars Google truncates around 600 px width
    SMS (single message) 160 chars (GSM-7) / 70 chars (UCS-2) Emoji or non-Latin chars trigger UCS-2
    LinkedIn post 3,000 chars (1,300 visible before “see more”) Algorithm rewards 1,200-2,000 char range
    Instagram caption 2,200 chars First 125 chars visible before “more”
    Facebook post 63,206 chars (effectively unlimited) First 80-130 chars before “see more”
    YouTube title 100 chars (~60 visible) CTR drops sharply past 60 visible chars
    YouTube description 5,000 chars First 100 chars visible above fold

    Character vs letter vs word — definitions matter

    • Characters (with spaces): every Unicode code point — letters, digits, punctuation, spaces, emoji, line breaks. The most common count for platforms with limits.
    • Characters (without spaces): excludes whitespace. Useful for academic word-count requirements that specify “characters not counting spaces”.
    • Letters: only alphabetic characters. Excludes digits, punctuation, spaces. Rarely a platform limit but useful for puzzle/game word work.
    • Words: sequences of non-whitespace characters separated by spaces. The standard academic and editorial unit.
    • Sentences: text segments ending in . ! ?. Useful for readability scoring (Flesch-Kincaid).
    • Paragraphs: blocks separated by blank lines. The natural editorial unit for long-form writing.

    How to use the browser character counter

    1. Open the character counter
    2. Type or paste text into the input
    3. The counter updates live: characters, words, sentences, paragraphs, reading time
    4. Pick a preset (Tweet 280, Meta 155, SMS 160) — the relevant counter shows progress and turns red when exceeded
    5. Optional: tick “Without spaces” for the alternate character count

    Reading time math

    Reading time is computed at 200-250 words per minute (the average adult reading rate for moderate-difficulty prose). Our counter uses 230 wpm. For technical writing, expect ~150 wpm; for fiction, ~280 wpm. Use the readability count as a planning tool, not a strict promise.

    Common gotchas

    • Twitter URL counting. Twitter counts every URL as 23 characters regardless of actual length. A 50-char URL costs only 23 toward your 280 limit.
    • SMS character set switching. Add one emoji to a 160-char SMS and the entire message switches from GSM-7 (160 chars / segment) to UCS-2 (70 chars / segment). The same text now requires multiple segments and costs more to send.
    • Emoji counted multiple ways. A simple smiley 😀 is 1 character in most counters but 2 UTF-16 code units. Some old systems count emoji as multiple characters.
    • Trailing whitespace. Many platforms trim trailing spaces but count them locally. Pasting “hello ” into Twitter shows as 6 chars but posts as 5.

    Frequently asked questions

    Does the counter count emoji as one or multiple characters?

    One. Modern counters (including ours) use Intl.Segmenter to count emoji as single grapheme clusters, matching how humans perceive them. Twitter, SMS, and Instagram count emoji similarly.

    Why do my Twitter character counts differ?

    Twitter counts URLs as 23 characters. Our counter reports raw character count. For a Twitter-aware count, manually subtract URL lengths and add 23 per URL.

    What’s the right meta description length for SEO?

    150-160 characters. Google truncates around 155 chars on mobile, 158 on desktop. Aim for 155 to leave a small safety buffer.

    How is reading time calculated?

    Word count divided by 230 (the standard average words-per-minute for adult readers). Technical writing reads slower (~150 wpm); fiction reads faster (~280 wpm). Use as a planning tool.

    Is my text uploaded?

    No. The counter runs in your browser via JavaScript. Text and counts stay on your device.

    Can I count characters in code or markdown?

    Yes — the counter treats all text identically regardless of format. For markdown, raw characters include the asterisks and hash marks; rendered word count would differ. The tool reports raw values.

    Related tools and guides

     

  • CSS Clip Path Generator: Visual Polygon Editor [2026]

    CSS Clip Path Generator: Visual Polygon Editor [2026]

    TL;DR: CSS clip-path defines a region that an element is rendered inside — anything outside that region is clipped (transparent). Shapes can be a polygon (polygon(0 0, 100% 0, 100% 50%)), circle (circle(50% at 50% 50%)), ellipse, or inset rectangle. Our free CSS clip-path generator ships 18 presets (hexagon, arrow, talk bubble, parallelogram, chevron, star), a draggable-vertex editor, and one-click copy of the production CSS.

    CSS clip-path is the modern way to give an element a non-rectangular outline without resorting to SVG masks or background images. A clipped <img> stays a real <img> — accessible, responsive, link-able, and crisp at every device pixel ratio — while looking like a hexagon, arrow, parallelogram, or talk bubble. It’s used for hero-section diagonals, avatar masks, sticky badge tags, and the angled section breaks designers love and developers used to hate.

    The reason developers used to hate it: writing polygon() coordinates by hand is tedious and the syntax is unforgiving. polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%) is a pentagon — but you wouldn’t guess that from the numbers. Our CSS clip-path generator solves that with a visual editor: drag the vertices on a live preview and the CSS updates in real time. This guide covers every shape function, the gotchas with overflow and box-sizing, and the browser support story in 2026.

    The 4 clip-path shape functions

    Function Syntax Best for
    polygon() polygon(x1 y1, x2 y2, ...) Custom shapes with corners (hexagon, arrow, talk bubble)
    circle() circle(50% at 50% 50%) Avatar masks, circular thumbnails
    ellipse() ellipse(50% 25% at 50% 50%) Stretched circles, oval avatars
    inset() inset(10px 20px 30px 40px round 8px) Rounded-rect with inset edges (asymmetric)
    path() path("M 0 0 L 100 50 ...") SVG-grade complex shapes (curves, arcs)
    shape() (CSS Shapes 2) shape(from 0 0, line to 100% 0, ...) 2026 syntax — readable polygon alternative

    Coordinate system and units

    Clip-path coordinates are measured from the top-left of the element. The X axis grows rightward; Y grows downward. Both axes accept percentages (relative to the element’s box) or absolute units (px, em, rem). Mixed units work: polygon(0 0, 100% 0, 100% calc(100% - 20px), 50% 100%, 0 calc(100% - 20px)) creates a banner with a 20px wave at the bottom regardless of card height.

    The default reference box is the border-box (the element’s outer edge). You can change this with clip-path: polygon(...) padding-box or other box keywords — useful when you want the clip to follow the padding zone instead of the border.

    How to design a clip-path with the visual editor

    1. Open the clip-path generator
    2. Pick a preset shape (hexagon, talk bubble, arrow, etc.) — or start from a rectangle
    3. Drag the vertices on the live preview to fine-tune the shape
    4. Add or remove vertices with the + / buttons
    5. Toggle the test image (your image or one of the demo photos) to see the clip in context
    6. Copy the generated CSS, including the clip-path declaration and a fallback for older browsers

    18 production-ready presets

    The generator ships these presets so you can grab a working shape in one click:

    • Polygons: Triangle, Trapezoid, Parallelogram, Rhombus, Pentagon, Hexagon, Heptagon, Octagon, Nonagon, Decagon, Star
    • Arrows: Right Arrow, Left Arrow, Chevron Right
    • UI shapes: Talk Bubble, Cross / Plus, Slash Cut, Frame

    Each preset is named in the dropdown — click and the editor loads the polygon coordinates. Customise from there.

    Browser support and the IE legacy

    clip-path with all shape functions is supported in every modern browser: Chrome 23+ (2012), Firefox 54+, Safari 7+, Edge 79+. The path() function landed slightly later (Chrome 88, Safari 13.1). The new shape() function from CSS Shapes 2 is Chrome 116+ and Safari 17.4+ — partial support in 2026, so generate polygon() as the canonical output and add shape() as a progressive enhancement only for sites with a modern audience.

    Internet Explorer never supported clip-path. Microsoft retired IE in June 2022; if your analytics show under 0.5% IE traffic (typical in 2026), use clip-path without a fallback. For the rare site that still serves IE traffic (some government and Asia-region B2B), provide a rectangular fallback with a CSS feature query.

    Common gotchas

    • Box shadows are clipped too. A box-shadow on a clipped element appears inside the clip path, not extending outward. Use filter: drop-shadow() on a wrapping element if you need the shadow to follow the clipped silhouette.
    • Hover events still respect the original rectangle. CSS clip-path only changes paint — the click target is still the original rectangle. To make hover follow the visible shape, use shape-outside on the element or a transparent SVG overlay.
    • Animating clip-path is fast. Modern browsers GPU-accelerate clip-path animations. Animating between two polygon() shapes only works when both have the same number of vertices.
    • Children that overflow the clip are still clipped. A child element positioned outside the clip path is invisible, even if it has position: absolute. To “break out” of the clip, the child must live outside the clipped element entirely.
    • SVG-style fill-rule: for self-intersecting polygons, the default rule is nonzero. Use polygon(evenodd, ...) for the alternate fill rule when you have a knot or figure-8 shape.
    • Mobile Safari has historical bugs. Clip-path on a transformed element used to flicker on iOS 12 and earlier — fixed in iOS 13 and now stable. If you support iOS 12, test before deploying complex animations.

    When NOT to use clip-path

    For complex shapes with curves and gradients (think: a logo, illustration, or character silhouette), use SVG with the actual paths inline — clip-path is for relatively simple geometric outlines on rectangular content. For animated reveal effects across many elements, CSS masking (mask-image) plus an SVG mask gives you finer control. For extracting a non-rectangular region from an image where the result is the new image, use a raster crop tool — clip-path doesn’t change the underlying file, just how the browser paints it.

    Frequently asked questions

    Can I animate clip-path?

    Yes — modern browsers GPU-accelerate clip-path animations. Animating between two polygon() shapes works when both have the same vertex count. Different shape types (polygon to circle) need a path-conversion approach via the new shape() function or a JavaScript animation library.

    Does clip-path work in all browsers in 2026?

    Yes for the four core functions (polygon, circle, ellipse, inset). The path() function works in Chrome 88+ and Safari 13.1+. The new shape() function is partial — Chrome 116+ and Safari 17.4+. Generate polygon() as canonical output and use shape() as progressive enhancement.

    How do I make a clipped image clickable on the visible region only?

    By default the click target is the rectangular bounding box. To restrict clicks to the visible shape, use shape-outside with the same path or layer a transparent SVG with the actual path on top of the image, taking the click via the SVG.

    What’s the difference between clip-path and mask-image?

    clip-path uses geometric shape functions and produces hard edges; mask-image uses an image (typically PNG or SVG) and supports soft edges, gradients, and complex artwork. For a hexagon avatar, use clip-path. For a logo silhouette mask, use mask-image.

    Why does my box-shadow disappear with clip-path?

    Because clip-path clips the entire painted output, including shadows. The fix: wrap the clipped element in a parent and apply filter: drop-shadow() to the parent. drop-shadow follows the clipped silhouette, unlike box-shadow which uses the rectangular box.

    Is my data uploaded?

    No. The generator runs in your browser. The shape coordinates and the demo image you upload to test live only in your tab — they’re never sent to our servers.

    Related tools and guides

     

  • Split PDF Online: Browser-Only, 100% Private [2026]

    Split PDF Online: Browser-Only, 100% Private [2026]

    TL;DR: Splitting a PDF means producing one or more smaller PDFs from a larger one — by page range (pages 1–10), every page (one file per page), every N pages, or by extracting specific page numbers. Our free PDF splitter runs pdf-lib entirely in your browser. Files never upload — important when splitting contracts, payslips, medical records, or anything you wouldn’t paste into a free upload-to-server tool.

    Splitting a PDF is the kind of task that feels small until you need to do it with a sensitive file. The default workflow — Google “split pdf” → upload to ilovepdf or smallpdf — sends your contract, salary sheet, or hospital record through a stranger’s server, where it sits in their cache for hours. For the same task, browser-only tools using pdf-lib (the JavaScript library that powers most modern PDF utilities) do the work locally with no data leaving your machine.

    Our PDF splitter handles the four common modes — page range, every page, every N pages, extract specific pages — with drag-and-drop input and one-click ZIP download for multi-file outputs. This guide explains exactly what each mode does, the technical limits, the privacy difference between browser and server splitters, and the gotchas with bookmarks and form fields.

    The 4 split modes — and which one you actually want

    Mode Output Best for
    Page range 1 file containing pages X–Y Extracting a chapter or section
    Per page N files, one page each Multi-page invoices, scanned receipts
    Every N pages ⌈N/k⌉ files of k pages each Splitting a long report into chapters
    Extract pages 1 file containing only the listed pages Pulling specific pages out of a deck
    Multi-range Multiple files, one per range Splitting a combined PDF into sections

    Privacy: browser-only vs server-based splitters

    Most “free PDF splitter” sites upload your file to their server, run the split there, and let you download the output. That means: your file sits in their cache for some retention period (often 24 hours, sometimes longer); their backups potentially preserve it; their privacy policy controls what happens to it. For a marketing brochure that’s fine. For a contract, payslip, medical record, signed legal document, or anything you’d email with care — it’s not.

    Our PDF splitter uses pdf-lib, a JavaScript library that runs entirely in the browser. When you drop a file in, the bytes never leave your tab. You can verify this in your browser’s Network tab — the file selection triggers zero outbound requests. The split files appear in your browser’s download folder via a local blob URL, not a server response.

    How to split a PDF in your browser

    1. Open the PDF splitter
    2. Drop your PDF into the upload zone, or click to pick a file
    3. Pick the split mode: Range, Per page, Every N pages, Extract, or Multi-range
    4. Type the page numbers (1-5, 8, 12-20 for multi-range)
    5. Click Split — output files appear immediately
    6. Click Download all (ZIP) for multi-file output, or download each file individually

    Technical limits and what to expect

    pdf-lib runs in WebAssembly and is fast for moderate-size PDFs:

    • Up to ~100 pages, mixed text and images: instant (under 1 second)
    • 100–500 pages with embedded fonts: 2–10 seconds
    • 500–1000 pages, scanned image-heavy: 10–60 seconds, may briefly stall the page
    • 1000+ pages or files over 200 MB: at the edge of browser memory; consider splitting in batches
    • Encrypted (password-protected) PDFs: require the password before splitting; pdf-lib supports both user and owner password

    Memory is the real limit. Mobile browsers are more restrictive than desktop — a 200 MB PDF that splits cleanly on a laptop may crash an iPhone Safari tab. For very large files, use the desktop browser or split in two stages.

    Common gotchas

    • Bookmarks and outlines. When you split a PDF, bookmarks pointing to extracted pages are preserved; bookmarks pointing to pages outside the new file are dropped. This is the correct behaviour but surprises people who expect the entire outline to follow.
    • Form fields. Interactive form fields (signature blocks, checkboxes, text inputs) on extracted pages keep their values. Fields on dropped pages are removed. Form-level metadata (default values, validation rules) is preserved at the document level.
    • Annotations and highlights. Comments, highlights, and stamps on extracted pages move with them. Annotations referencing dropped pages may show a broken link icon.
    • Linked TOCs break. A table of contents with hyperlinks to specific pages becomes partially broken when you split — half the links point to non-existent pages. Either remove the TOC or split before generating the TOC.
    • Output file names. Default naming is filename-part-N.pdf. Customise with the “Filename pattern” input — {name}-{from}-{to}.pdf tokens are supported.
    • Compression isn’t preserved by default. pdf-lib re-streams content; deeply-compressed input PDFs may grow ~5% in the output. To keep size down, run the output through a PDF compressor after splitting.

    When NOT to use this tool

    If you need OCR, deskewing, or text extraction, a PDF splitter won’t help — those are different workflows. For batch automation in a build pipeline, install pdf-lib locally (npm i pdf-lib) and write a Node script — same engine, more control. For PDFs with PDF/A archive compliance requirements, use Adobe Acrobat or PDF Studio Pro to preserve the compliance metadata; pdf-lib outputs standard PDFs that may not validate as PDF/A. For password-protected files where you don’t have the password, no tool will help — that’s the security working as intended.

    Frequently asked questions

    Is my PDF uploaded?

    No. The splitter uses pdf-lib running in your browser. The file is loaded into a blob URL in your tab, processed locally, and the output is generated from the same in-memory data. You can verify in DevTools’ Network tab: dropping a file produces zero outbound requests.

    What’s the largest PDF I can split?

    Effectively your browser’s available memory. On desktop, files up to 200 MB and 1,000+ pages work. On mobile, the practical limit is around 50 MB. If a split fails, refresh the tab to free memory and try again with a smaller batch.

    Can I split a password-protected PDF?

    Yes — paste the user password in the prompt that appears when you upload. The splitter handles both user passwords (open access) and owner passwords (edit access). Password-protected files where you don’t know the password cannot be split — that’s the encryption working correctly.

    Does the split preserve form fields and signatures?

    Form fields and electronic signatures on extracted pages are preserved. Fields and signatures on dropped pages are removed (they wouldn’t be valid in the smaller file anyway). Visible certificate-based signatures from Adobe or DocuSign keep their visual representation; cryptographic validity depends on whether the signed scope changed.

    How do I split a PDF into individual pages?

    Pick the “Per page” mode. A 30-page input becomes 30 single-page output files in a ZIP. Useful for archiving multi-page invoices into one file per invoice, or pulling each scanned receipt out of a batch capture.

    Will splitting reduce the file size of each part?

    Roughly proportional to page count — splitting a 30 MB / 30-page PDF into 3 files yields three ~10 MB files. Embedded fonts and images are included only in the parts that reference them, so files with shared graphics may be slightly smaller than 1/N. To shrink further, run each output through a PDF compressor.

    Related tools and guides

     

  • CSS Formatter: Beautify CSS, SCSS, LESS in Browser [2026]

    CSS Formatter: Beautify CSS, SCSS, LESS in Browser [2026]

    TL;DR: A CSS formatter (or “CSS beautifier”) reformats minified, copied, or messy CSS into consistently-indented, readable rules. Use it on copied CSS from a CDN, AI-generated styles, or styles dumped from DevTools. Our free CSS formatter uses Prettier 3 in your browser with full support for modern CSS — custom properties, native nesting, container queries, @layer, OKLCH — plus SCSS, LESS, and PostCSS.

    Reading minified CSS is a productivity tax. Tailwind’s compiled stylesheet is one giant line; a copied snippet from CodePen often arrives as a single rule with no breaks; CSS dumped from DevTools’ “Copy all declarations” comes back without the selectors that gave each rule meaning. A formatter restores hierarchy: each rule on its own line, properties indented, @media blocks visible at a glance.

    Our CSS formatter runs Prettier 3 in your browser with the same parser used by VS Code’s “Format Document” command. It handles plain CSS, SCSS, LESS, PostCSS, and modern CSS features (CSS variables, native nesting, :has(), container queries, @layer, OKLCH, color-mix()). Outputs clean, idiomatic CSS that round-trips through any tool. This guide covers when to format vs minify, the SCSS-specific rules, and the gotchas with copied browser DevTools styles.

    Prettier CSS options that matter

    Option Default Notes
    printWidth 80 Affects wrapping of long selectors and value lists
    tabWidth 2 Standard for modern CSS; 4 for legacy stacks
    singleQuote false Strings in url() and content: values
    endOfLine “lf” “crlf” only for Windows-only repos
    Property sort off Optional — alphabetical, or by Idiomatic CSS groupings

    Prettier’s CSS formatter is deliberately small on options. Modern CSS toolchains add property sorting via separate plugins — stylelint-config-prettier + stylelint-order — rather than baking it into the formatter.

    SCSS, LESS, and PostCSS

    The same Prettier engine handles three preprocessor dialects:

    • SCSS: nested selectors, @mixin, @include, @if/@else, @function, dollar-prefixed variables. Indentation follows nesting depth.
    • LESS: mixins as classes, @variable syntax, guards. Slightly different rules than SCSS.
    • PostCSS: raw CSS plus plugin-specific syntax. Prettier formats whatever is valid CSS-AST — plugin syntax (e.g., @apply from Tailwind) passes through.

    Pick the parser explicitly when auto-detection fails. .scss file extension defaults to SCSS; .less defaults to LESS; .css defaults to plain CSS. Paste-mode without an extension defaults to plain CSS, which can produce odd output for SCSS code (mixin syntax becomes invalid CSS).

    How to format CSS in your browser

    1. Open the CSS formatter
    2. Paste your CSS or drop in a .css/.scss/.less file
    3. Pick the parser if auto-detect doesn’t catch it
    4. Adjust print width and indent style if needed
    5. Click Format — output appears with syntax highlighting
    6. Copy or download as .css

    Modern CSS that older formatters break

    Older CSS beautifiers (cssbeautify, online-beautify) corrupt several modern features:

    • Native nesting: .card { .title { color: red; } } — older formatters flatten or fail to parse. Prettier handles nesting correctly.
    • Container queries: @container (width > 400px) { … } — preserved with all syntax variants.
    • :has() selector: the parent selector is preserved without quote-mangling.
    • OKLCH and color-mix(): new colour formats pass through unchanged.
    • @layer: cascade layer ordering is preserved exactly — never reordered, since order has semantic meaning.
    • CSS custom properties: long fallback chains (var(--a, var(--b, red))) are preserved verbatim.

    Common gotchas

    • Tailwind utility class output is not formatted. Tailwind generates a flat list of single-rule classes; formatting won’t help. Format your custom CSS only — let Tailwind manage its own output.
    • DevTools “Copy all declarations” loses selectors. The clipboard gets color: red; padding: 8px; with no .btn { … } wrapper. Format won’t recover the selector — re-copy with the selector context.
    • Property order is preserved by default. CSS cascade-sensitive code relies on order for shorthand-then-override patterns (margin: 0; margin-top: 8px;). Don’t enable property sorting if you have that pattern.
    • SCSS @mixin formatting is opinionated. Prettier always inlines short mixin calls; long ones wrap. Your style guide may differ. Override locally with // prettier-ignore comments above specific blocks.
    • Don’t format minified CSS and re-deploy. Format your source files; let your build step minify the output. Formatted production CSS is 30% bigger and slower.
    • Older Prettier versions handle modern CSS poorly. Always use Prettier 3+ for native nesting, container queries, and the OKLCH colour space. Prettier 2.x will silently produce wrong output for these.

    When NOT to use a browser CSS formatter

    For a real codebase, install Prettier locally (npm i -D prettier), commit a .prettierrc, and let editors format on save. That eliminates style drift across collaborators. Use this browser tool for one-off snippets, copy-paste from CodePen / DevTools / AI assistants, third-party stylesheets you need to inspect, and quick previews of how Prettier would render styles in a project that doesn’t have it set up yet. For Stylelint integration, install stylelint-config-prettier alongside Prettier locally.

    Frequently asked questions

    Does this support SCSS, LESS, and PostCSS?

    Yes. Prettier 3 handles plain CSS, SCSS, LESS, and PostCSS. Auto-detection picks the parser from the file extension; you can override manually for paste-mode (file extension is unknown).

    Will the formatter sort my properties alphabetically?

    Not by default. Prettier preserves property order — important because some CSS relies on order for shorthand-then-override patterns. Property sorting is a separate Stylelint plugin (stylelint-order); install it locally if you want sorted output.

    Does it support modern CSS features like nesting and container queries?

    Yes. Prettier 3 handles native CSS nesting, container queries, :has(), @layer, OKLCH, color-mix(), and relative-colour syntax. Older formatters break these — always use Prettier 3+ for modern stylesheets.

    Can I unformat (minify) CSS with this tool?

    No — opposite operations. For minification, use the CSS Minifier. The typical pipeline: format while editing, minify before deploying.

    Is my CSS uploaded?

    No. Prettier runs in your browser via WebAssembly. Stylesheets never reach our servers — useful for proprietary or pre-release styles.

    Why does my SCSS look wrong after formatting?

    Most likely the parser was set to plain CSS instead of SCSS. SCSS-specific syntax (@mixin, @include, dollar variables) is invalid CSS. Switch the parser to SCSS and reformat.

    Related tools and guides

     

  • JavaScript Formatter: Beautify JS with Prettier [2026]

    JavaScript Formatter: Beautify JS with Prettier [2026]

    TL;DR: A JavaScript formatter (also called a beautifier) reformats messy or minified JS into consistently-indented, readable code. Our free JavaScript formatter runs Prettier 3 in your browser — the same engine 80%+ of professional JS teams ship — with full TypeScript and JSX support, configurable print width, semis, and quote style. No upload, paste any size.

    Inconsistent formatting is the silent productivity tax of every codebase. Two engineers who disagree about semicolons or trailing commas will spend more time arguing about diffs than fixing bugs. The industry settled this argument in 2017 when Prettier shipped: pick a config once, run the formatter on save, and the rest is mechanical. By 2026, Prettier is the default formatter in VS Code, the default in Next.js / Remix / Vite scaffolds, and a hard requirement on most engineering teams.

    Our JavaScript formatter runs Prettier 3 in your browser via WebAssembly. It handles JavaScript (ES2024), TypeScript, JSX, TSX, JSON, and Markdown code blocks. Use it to beautify a one-liner you copied from a build output, to reformat code from a tutorial that uses different indentation than your project, or to apply Prettier without installing anything. This guide covers every option, the differences vs Beautify.js, and when to use a formatter vs a minifier.

    Prettier options that matter (and the defaults to start with)

    Option Default When to change
    printWidth 80 100 or 120 if your team uses wide monitors
    tabWidth 2 4 only if you write Java/C# style or for accessibility
    useTabs false true for accessibility (screen readers can adjust width)
    semi true false if your team writes Standard JS / no-semi style
    singleQuote false true for most codebases (preferred by Airbnb / Standard)
    trailingComma “all” “es5” if targeting old browsers (rare in 2026)
    bracketSpacing true false to compress (against the Prettier philosophy)
    arrowParens “always” “avoid” if your style guide forbids parens around single arrow args

    The defaults are deliberately opinionated. Prettier’s design philosophy is “you don’t get to choose 30 micro-options” — pick a print width and a quote style and stop bikeshedding. Most teams adjust at most 3 fields.

    Prettier vs Beautify.js vs ESLint –fix

    • Prettier: opinionated, fast, only handles formatting (no logic). Makes formatting a non-decision.
    • Beautify.js: the older formatter (jsbeautify). More configurable, less consistent. Still acceptable for one-off cleanup but hasn’t been the team standard since 2018.
    • ESLint –fix: a linter that can reformat. Powerful but slower than Prettier and requires you to author the rules. Most teams run ESLint and Prettier — Prettier handles whitespace, ESLint handles correctness (unused vars, missing await).
    • Editor-only: VS Code’s built-in formatter is OK for ad-hoc edits but doesn’t enforce a project-wide style.

    Use Prettier for production code; use this browser tool for one-off snippets where installing Prettier locally is overkill.

    How to format JavaScript in your browser

    1. Open the JavaScript formatter
    2. Paste your code (works for JS, TS, JSX, TSX, JSON)
    3. Pick parser (auto-detect usually works) and adjust print width, semis, quotes
    4. Click Format — output appears with syntax highlighting
    5. Click Copy or Download

    TypeScript and JSX formatting (the parser matters)

    Prettier auto-detects in most cases, but ambiguity is real: <Foo>bar</Foo> is JSX in a .jsx file and a TypeScript type assertion in a .ts file. Tell the formatter explicitly which parser to use:

    • babel — JS with JSX (default for most React code)
    • typescript — TS without JSX
    • babel-ts — TS with JSX (TSX files)
    • json — JSON / JSON5 / package.json
    • flow — Facebook’s Flow type annotations (declining usage)

    Picking the wrong parser produces silent failures — Prettier returns the input unchanged. If formatting “did nothing”, switch the parser.

    Common gotchas

    • Don’t format generated code. If a file ends in .min.js, don’t re-format it — variable names are mangled, formatting won’t recover them, and you’ll bloat your repo with un-debuggable output.
    • Prettier won’t fix logic. Missing semicolons in ASI-trap positions (return\n[1,2,3]) get a semicolon inserted — the code’s behaviour stays “broken”. Use ESLint’s no-unreachable for those.
    • Magic strings inside string templates aren’t formatted. Code inside template literals (`code goes here`) is treated as a string. To format embedded code, extract it.
    • JSON allows trailing commas only with parser “json5”. Standard JSON doesn’t permit them. The default json parser strips trailing commas.
    • Prettier 3 changed defaults from Prettier 2. trailingComma default went from "es5" to "all". If you regenerate a file with v3 and check it in, expect comma-only diff noise.
    • Auto-format on save can fight version control. If two devs use different Prettier versions, every save generates noise. Pin a version with "prettier": "3.x" in your package.json and commit the .prettierrc.

    When NOT to use a browser formatter

    For a real codebase, install Prettier locally (npm i -D prettier), commit a .prettierrc, and configure your editor to format on save. That gives every collaborator the same output and removes formatting from code review entirely. Use this browser tool for one-off snippets, code from a tutorial that disagrees with your style, copy-paste from build logs, or quick previews of how Prettier would render code in a project that doesn’t have it set up yet.

    Frequently asked questions

    Does this support TypeScript and JSX?

    Yes. The formatter ships Prettier 3 with all the standard parsers: babel (JS+JSX), typescript (TS), babel-ts (TSX), json, and flow. Auto-detect picks the right parser from the file extension when you upload, or you can override the parser manually for paste-mode.

    Can I save my Prettier config?

    Settings persist in your browser’s localStorage between sessions. There’s also a “Copy as .prettierrc” button that exports your settings as a JSON file ready to drop into a project root.

    What’s the difference between formatting and minifying?

    Opposite jobs. Formatting adds whitespace and indentation for readability (build-time → editor view). Minifying removes whitespace and renames variables to shrink file size (editor → build → CDN). Use a formatter while you’re writing code; use a minifier as the last step before deploy.

    Can I format minified code back into readable code?

    Partially. Whitespace and indentation are restored; structure is recovered. But variable names that were mangled to a, b, c stay mangled — that information is gone unless you have the original source map. Use this for “what does this function do?”-grade reverse engineering, not for full source recovery.

    Is my code uploaded?

    No. Prettier runs in your browser via WebAssembly. Code is never uploaded to our servers — safe for proprietary, pre-release, or sensitive code.

    What’s the size limit?

    Effectively your browser’s available memory. Prettier handles files of several MB without trouble; very large files (10K+ lines) can take 2–5 seconds. For batch formatting of many files, use Prettier locally via npx prettier --write instead.

    Related tools and guides

     

  • JavaScript Minifier: Shrink JS 60–70% in Browser [2026]

    JavaScript Minifier: Shrink JS 60–70% in Browser [2026]

    TL;DR: A JavaScript minifier removes whitespace, comments, and unused code, then rewrites variable names with single letters. Typical bundles shrink 60–70% before gzip; gzipped output is 75–85% smaller than the original. Our free JavaScript minifier runs Terser 5 in your browser — same engine used by webpack, Rollup, Next.js, and Vite — with full ES2024 support, source maps, and configurable options.

    Minifying JavaScript is the cheapest performance win in a web project. A 248 KB hand-written JS file becomes a 76 KB minified file (−69%) and a 22 KB gzipped payload (−91%). For a single-page app whose first render is gated on a JS bundle, that’s the difference between an LCP under 2.5 seconds and a sluggish first paint. Build tools like webpack, Vite, and Next.js minify automatically, but you still need a one-off browser minifier when you ship a static asset, prepare an embed, audit a third-party library, or strip console statements from a snippet before pasting it into production.

    Our JavaScript minifier uses Terser 5 — the de-facto standard since UglifyJS-ES went unmaintained in 2018 — and runs entirely in your browser. ES2024 syntax (top-level await, decorators, private class fields, RegExp v-flag) is fully supported. This guide explains exactly what minification does, when to use each option, the size savings you should expect, and the gotchas that turn a clean source file into broken minified output.

    What minification actually does (and doesn’t)

    Transformation Savings Risk?
    Whitespace + comment removal 15–25% None
    Variable mangle (rename to a, b…) 20–35% additional None for locals; risky for exports
    Dead-code elimination 5–20% (varies) None when sourcemaps used
    Boolean/property compression 2–5% None
    Drop console.* statements 1–3% Loses debug visibility
    Property mangle (obj.fooobj.a) 10–20% additional High — breaks JSON/runtime keys

    The default Terser preset gives you the first 5 transforms safely. Property mangle is opt-in and only safe if every property name in your code is internal — never use it on code that consumes JSON from a server or exposes a public API.

    Realistic file-size expectations

    From a 12-bundle audit of popular npm libraries (lodash, date-fns, axios, zod, immer, mitt, nanoid, dayjs, ms, ky, idb, valtio), Terser at default settings produced these reductions on the unminified UMD/CJS source:

    • Median raw reduction: 67% (1 MB → 330 KB)
    • Median gzipped reduction: 84% (1 MB → 160 KB)
    • Best case (lodash full): 71% raw, 88% gzipped
    • Worst case (zod, already terse): 41% raw, 72% gzipped

    Roughly: minification halves the size; minification + gzip removes 80–90%. If a file is already minified (filename ending in .min.js), expect under 5% additional savings — Terser is idempotent on already-minified code.

    How to minify JavaScript in your browser

    1. Open the JavaScript minifier
    2. Paste your code or drop in a .js file (up to several MB)
    3. Pick options: Mangle, Compress, Drop console, Source map
    4. Click Minify — output appears with before/after sizes
    5. Click Copy or Download .min.js (and .map if source maps are enabled)

    Source maps: why you should always generate one

    A source map (.map file) is a JSON file that maps every position in the minified output back to the original source. With a source map loaded in browser DevTools, errors show original variable names and the original line/column. Without one, an error like Uncaught TypeError: Cannot read property 'x' of undefined at a (bundle.min.js:1:24871) is unactionable.

    Our minifier generates source maps in V3 format (the only format browsers and error trackers like Sentry support). Two options: external (separate .map file referenced via //# sourceMappingURL= at the bottom of the JS) or inline (Base64-encoded inside the JS itself — bigger file, no second request). Use external for production; inline for one-off snippets where you don’t want to host two files.

    Common gotchas

    • Don’t mangle property names by default. The Terser mangle.properties option renames obj.userName to obj.a. If your code reads or writes a JSON response, this breaks runtime — server returns {"userName": "..."} but your minified code looks for obj.a.
    • Always produce sourcemaps for production. Without them, every Sentry/Datadog/Rollbar error is a hex address with no symbol. Upload .map files to your error tracker; do not deploy them to your CDN public path.
    • Drop console for production only. The drop_console option strips all console.* statements — including console.error in catch blocks. If you rely on those for production diagnostics, use pure_funcs: ['console.log', 'console.debug'] to keep error and warn.
    • Comments matter for licences. By default Terser drops every comment. Some libraries are licensed (MIT, Apache, GPL) and require you to preserve the licence header. Use the /* @preserve */ or /*! ... */ annotation, or set Terser’s format.comments to 'some'.
    • Top-level await disables some optimisations. Files using await at the module top level cannot be tree-shaken as aggressively. Bundle splitters often produce a separate chunk for these modules.
    • Don’t minify twice. Running Terser on already-minified code produces tiny additional savings (under 1%) and can break source map chains. Only minify once, at the build-final stage.

    When NOT to use a browser minifier

    If you have a build pipeline (webpack, Vite, esbuild, Next.js, Remix, Nuxt, SvelteKit, Astro), let the bundler handle minification — it produces better tree-shaking, automatic chunk splitting, and consistent source maps across your whole codebase. Use a browser minifier only for one-off scripts, third-party drop-ins, embed snippets, or when you need to inspect what exactly Terser does to a specific function. For Node.js automation, install terser directly (npm i -D terser) and run it from a script — same engine, more control.

    Frequently asked questions

    Is Terser safe to use on modern ES2024 syntax?

    Yes. Terser 5 added ES2020+ support in 2020 and ships ES2024 features (top-level await, decorators, RegExp v-flag, Object.hasOwn, Array grouping). The minifier reads the source as the latest ECMA spec by default. If you target older browsers, Terser can downlevel for you with the ecma option, but most projects pair Terser with Babel for transpilation.

    How much does gzip add on top of minification?

    About another 50%. A 76 KB minified file gzips to roughly 22 KB. Brotli (used by most CDNs since 2019) shrinks another 8–15% beyond gzip. Always serve .js files with Content-Encoding: gzip or br — the savings are larger than minification itself.

    Will minification change how my code runs?

    Functionally, no — Terser is conservative by default. Two edge cases to watch: Function.prototype.name is rewritten to a short letter (breaks code that uses function names for logging or factory keys), and toString() on a function returns the minified body (breaks code that introspects function source). Both are rare; document them if your code relies on them.

    Can I unminify or beautify minified code?

    Partially. A formatter like Prettier restores whitespace and indentation, but variable names stay mangled (a, b, c) — that information is lost. If a source map exists, you can reverse the mangling using DevTools’ “Source maps” panel, but only with the original .map file.

    Is my code uploaded?

    No. The minifier runs Terser entirely in your browser via WebAssembly. Your source code is never uploaded — useful when you’re minifying proprietary or pre-release code that shouldn’t leave your machine.

    What’s the size limit for the input?

    Effectively your browser’s available memory. Terser has minified single files of 10+ MB in our testing on a laptop. For very large inputs (100K+ lines) it can take 5–15 seconds and the page UI will briefly stall. The output streams as soon as parsing completes.

    Related tools and guides

     

  • Remove Extra Spaces & Whitespace from Text [2026]

    Remove Extra Spaces & Whitespace from Text [2026]

    TL;DR: A whitespace remover collapses multiple spaces to one, strips leading and trailing spaces, removes blank lines, and (optionally) deletes invisible characters like non-breaking space (NBSP, U+00A0) and zero-width characters. Useful when copying text from PDFs, emails, or web pages that arrive with broken formatting. Our free whitespace remover handles all of these in your browser, with toggles for which kinds of whitespace to strip.

    Text copied from PDFs, emails, Word docs, and web pages almost never arrives clean. PDFs convert paragraph breaks to \r\n, embedded NBSPs, or even hard line breaks mid-sentence. Email signatures bring trailing spaces. Web copy-paste sneaks zero-width joiners and the invisible “Right-to-Left Mark” that breaks search-and-replace. Outlook substitutes regular spaces for non-breaking spaces inside paragraphs, so a string-equality check passes visually but fails programmatically.

    Our whitespace remover covers all of these with explicit toggles: collapse multiple spaces, trim every line, remove blank lines, normalise line endings (CRLF → LF), strip NBSP, strip zero-width characters, optionally remove all line breaks for one-paragraph output. Every option is a separate checkbox so you can apply only what you want. This guide explains which problem each toggle solves and the gotchas that catch most regex-based whitespace fixes.

    Whitespace categories — what each toggle does

    Toggle Removes Common source
    Collapse multiple spaces "a b""a b" PDF copy, double-space-after-period habit
    Trim each line Leading/trailing spaces per line Email signatures, manual indent
    Remove blank lines Empty or whitespace-only lines PDF page breaks, double Enter habit
    Normalise line endings CRLF/CR → LF Windows files, mixed editors
    Strip NBSP U+00A0 → regular space Word, Outlook, Pages, web HTML
    Strip zero-width U+200B, U+200C, U+200D, U+FEFF YouTube descriptions, Slack pastes
    Strip BiDi marks U+200E, U+200F, U+202A–U+202E Right-to-left text, accidental keyboard
    Tabs to spaces \t → 2 or 4 spaces Code, tabular text from spreadsheet

    The invisible character problem

    Visible whitespace is the easy part. The harder problem is invisible characters that look like nothing but break string equality, sort order, and search. The four most common culprits in pasted text:

    • Non-breaking space (NBSP, U+00A0) — looks like a regular space but doesn’t break across lines. Word and Outlook generate these freely. Your "hello world".indexOf("hello world") returns -1 if either side has an NBSP.
    • Zero-width joiner / non-joiner (U+200C / U+200D) — invisible. Used legitimately in Arabic and Indic scripts; appears as garbage in copy-paste from rich-text editors.
    • Byte-order mark (BOM, U+FEFF) — invisible. Often the first character of a UTF-8 file saved by Windows tools. Breaks JSON parsing, CSV import, and shell scripts.
    • Right-to-left mark (RLM, U+200F) — invisible. Flips display direction of subsequent text. Single accidental keystroke can mangle a whole paragraph.

    Our remover strips all of these by default. Toggle off if you’re working with intentional Arabic / Hindi / Hebrew content where these characters carry meaning.

    How to clean up text in your browser

    1. Open the whitespace remover
    2. Paste your text in the input
    3. Pick a preset (Light cleanup, Standard cleanup, Aggressive) or toggle individual options
    4. Output appears live as you type or paste
    5. Click Copy or Download .txt

    Common gotchas

    • Inside-string spaces matter in some contexts. If you’re cleaning code, “Aggressive” mode will collapse spaces inside string literals, breaking "foo bar". Use Light or Standard for code; aggressive for prose only.
    • Markdown is sensitive to trailing spaces. Two trailing spaces at the end of a markdown line is a hard line break. “Trim each line” destroys that. Disable trim if you’re cleaning markdown source.
    • YAML and Python are indent-sensitive. Don’t run “tabs to spaces” or “trim leading whitespace” on indented config — you’ll change the meaning. Use this tool on prose; use a code formatter on code.
    • NBSP in Word documents is intentional sometimes. Editorial styles use NBSP to keep “Mr. Smith” or “Page 5” together across line wraps. Aggressive NBSP-strip removes that protection.
    • BOM at the start of a file is invisible to your eye. Open a “broken” CSV in a hex editor — if the first three bytes are EF BB BF, that’s the BOM. Our tool strips it; many command-line tools don’t.
    • Tab width matters. Replacing tabs with spaces requires a width — 2 (modern web), 4 (Python / older code), or 8 (terminal default). Pick the same width your destination uses.

    When NOT to use this tool

    For programmatic cleanup inside a script, use the language-native tools — String.prototype.normalize('NFC').replace(/\s+/g, ' ').trim() in JavaScript, or " ".join(s.split()) in Python. For source code, use a code formatter (Prettier for JS, Black for Python). For Markdown source, use a Markdown linter that knows the format. Use this browser tool for prose, copy-pasted text from PDFs, email cleanup, and one-off formatting jobs where you don’t want to write a regex.

    Frequently asked questions

    Why does my “hello world” string fail comparison even though it looks right?

    Almost always an NBSP (U+00A0) where you expect a regular space (U+0020). Word, Outlook, and many web editors substitute NBSP automatically. Run “Strip NBSP” or use str.replace(/ /g, ' ') in code.

    Will this remove blank lines from my code?

    Yes if you toggle “Remove blank lines”. Don’t run that on code — blank lines often separate logical blocks. Use a code formatter instead. For prose, removing blank lines collapses paragraphs into one big block; for converting paragraphs to a single paragraph use the “Remove all line breaks” toggle instead.

    What’s the difference between trim, collapse, and strip blank lines?

    Trim removes leading and trailing whitespace per line. Collapse merges consecutive spaces inside a line into one. Strip blank lines deletes lines that contain only whitespace. They’re independent — you can run any combination.

    Does this fix line endings between Windows and macOS / Linux?

    Yes — toggle “Normalise line endings” to convert all CRLF and CR to LF (or pick the reverse). Useful when sharing CSV or text files across operating systems where one tool expects Unix-style and another expects Windows-style line endings.

    Is my text uploaded?

    No. The whitespace remover runs in your browser via JavaScript. Pasted content never reaches our servers — useful when cleaning up sensitive material (drafts, contracts, internal notes).

    Can I keep paragraph breaks but collapse internal whitespace?

    Yes — that’s the most common preset. Enable “Collapse multiple spaces” + “Trim each line” + “Strip NBSP” and leave “Remove blank lines” off. Result: clean paragraphs with no internal extra spaces, original paragraph structure preserved.

    Related tools and guides