Skiptingar

Icelandic text, set well. Letter patterns, better breaks and locale details, all on the server. Pair them with CSS text-wrap. On a server-rendered page the browser runs no hyphenation code, and copied text comes out clean.

What it fixes

Browser

Kjörsókn í Hrafnafjarðarbyggð

Skiptingar

Kjör­sókn í Hrafna­fjarðar­byggð

Fig. 1 A long word runs past the measure. Skiptingar breaks it.

Browser

Verð 1.000 kr.

Skiptingar

Verð 1.000 kr.

Fig. 2 The unit drops to a line of its own. Skiptingar keeps it.

Browser

"Söguleg niðurstaða"

Skiptingar

„Sögu­leg niður­staða“

Fig. 3 Straight quotes stay straight. Skiptingar sets Icelandic ones.

Browser

Árin 1990-2010

Skiptingar

Árin 1990–⁠2010

Fig. 4 A hyphen stands in for the dash. Skiptingar sets an en dash.

What it is

  • Letter patterns

    23.139

    From the 2020 Árni Magnússon list. No word list, so new compounds break too.

  • Fewer breaks

    29%

    Better breaks drop 122.032 of the 416.492 breaks Ritreglur allows in the 2020 list.

  • Locale rules

    10

    • quotes
    • singleLetter
    • lastWords
    • dashes
    • phoneNumbers
    • units
    • dates
    • ordinals
    • abbreviations
    • titles

    Each rule can be turned on or off on its own.

  • Hyphenation JavaScript on a server-rendered page

    0 kB

    With <Hyphenate>, the server puts in the soft hyphens and no-break spaces, so every browser gets the same break points. Only CleanCopy, for clean copied text, runs in the browser: 0.6 kB. Text made in the browser, like the editor in Try it, asks your server for 2.3 kB.

Try it

Write your own text, change the width and the settings, and see where it breaks.

85 wordsStart a line with # to make it a title.The page now uses this text
Options
On by default, and you can turn it off. These rules drop legal breaks that read badly, such as ó-lán, the break before a linking syllable in sveitar-stjórnar-kosningum, and a break inside a foreign name like Icelandair. Off gives the official Ritreglur minimums only. The rules are new and under development, so turn them off if they give odd results.
On by default, and you can turn it off. Swaps some spaces for no-break spaces (in 1.000 kr. and 30. september, for example), straight quotes for Icelandic quotes, and the hyphen in a range like 1990-2010, or a spaced hyphen, for an en dash. This page also keeps a one-letter word like í with the word after it, a rule that is off by default. Each change swaps one character for another. The dash rule also adds an invisible word joiner after the en dash of a range.
On by default here, and I recommend it. It is CSS you add to the page, not a layer of the package: text-pretty (text-wrap: pretty) for body text and text-balance (text-wrap: balance) for titles. Off fills each line before it starts the next.
Draws a red · for every soft hyphen. Puts an amber fill behind every no-break space and no-break hyphen (U+2011). This shows what the components put in, except the invisible word joiner.

Kjör­sókn í Hrafna­fjarðar­byggð aldrei meiri í sveitar­stjórnar­kosn­ingum

Kjör­sókn í sveitar­stjórnar­kosn­ing­unum 16. maí 2026 var sú mesta sem mælst hefur í Hrafna­fjarðar­byggð, 91,4%. Á ár­unum 1990–⁠2010 var hún að jafn­aði um 78%. „Þetta er sögu­leg niður­staða,“ sagði dr. Guð­rún Sig­urðar­dóttir, for­maður yfir­kjör­stjórnar, á blaða­manna­fundi kl. 14.30 dag­inn eftir.

Lands­sam­tök ungra kjós­enda (LUKA) fylgd­ust með fram­kvæmd­inni. Í skýrslu þeirra, á bls. 12, kemur fram að kosn­inga­þátt­taka ungs fólks hafi auk­ist mest. Nán­ari upp­lýs­ingar eru á www.example.is og fyrir­spurnir má senda á kosningar@example.is eða í síma 588‑5522.

A soft hyphen (U+00AD) is an invisible character. It shows a hyphen only when the line breaks there.A no-break space (U+00A0) looks like a space. It keeps the words on both sides on one line.

Where Icelandic breaks

The letter patterns say where a word may break, within the Ritreglur minimums. Better breaks then keep only the breaks that read well.

Examples

The package sets each example; none is typed by hand. Each shows the same word with better breaks off (Ritreglur only) and on (the default). Better breaks are new and under development, so they may change. Turn them off in Try it, or with betterBreaks: false. How it works goes through each step.

  • Linking syllable

    The rule drops the break before a linking syllable (ar, ur, is, ir), so a genitive stays with its stem. Without the rule the break falls inside a part, as in sveit-ar.

    Ritreglur
    sveitarstjórnarkosningum
    Better breaks (default)
    sveitarstjórnarkosningum
  • Room

    Words need 6 or more letters, with 2 before a break and 3 after. A break after one letter is legal but reads badly.

    Ritreglur
    ólán
    Better breaks (default)
    ólán
  • Foreign names

    A capitalised name with c, q or w, letters Icelandic spelling does not use, stays whole.

    Ritreglur
    Icelandair
    Better breaks (default)
    Icelandair

Where Icelandic doesn’t break

Good line breaking also means knowing where not to break. Locale details keep these words together with no-break spaces and word joiners, and set Icelandic quotes and dashes.

Number and unitunits

Puts a no-break space between a number and its unit, so 1.000 kr. and 5 km stay on one line.

Off

Verð 1.000 kr. og 5 km leið í 20 °C hita.

On

Verð 1.000 kr. og 5 km leið í 20 °C hita.

Day, month and yeardates

Keeps a day with its month, and a month with the year after it, so 30. sep. 2026 and sept. 2027 stay on one line.

Off

Opnað 30. sep. 2026 og lokað í sept. 2027.

On

Opnað 30. sep. 2026 og lokað í sept. 2027.

Ordinalordinals

Keeps a number with a full stop, like 1. or 30., on the same line as the lowercase word after it.

Off

Hún lenti í 1. sæti í 2. umferð.

On

Hún lenti í 1. sæti í 2. umferð.

Abbreviation and numberabbreviations

Keeps an abbreviation with the number after it, so nr. 5, bls. 12 and kl. 14.30 stay on one line. Standard abbreviations like t.d. and o.s.frv. have no spaces, so they never break.

Off

Sjá bls. 12, nr. 5 og kl. 14.30.

On

Sjá bls. 12, nr. 5 og kl. 14.30.

Kennitala and phonephoneNumbers

Kennitala and phone numbers stay on one line. The hyphen becomes a no-break hyphen (U+2011) and the spaces become no-break spaces. CleanCopy puts a normal hyphen back when you copy.

Off

Kennitala 011390-2939, sími 588-5522 eða +354 588 5522.

On

Kennitala 011390‑2939, sími 588‑5522 eða +354 588 5522.

Title and initialtitles

Keeps dr., sr., próf. and hr. on the same line as the capitalised name after them. An initial, as in Jón G. Sigurðsson, stays with the name after it.

Off

Fundur með dr. Jóni og sr. Önnu.

On

Fundur með dr. Jóni og sr. Önnu.

One-letter wordssingleLetter

Puts a no-break space after a one-letter word, so it never ends a line. This rule is off by default, so this row turns it on.

Off

Hún á hest og býr í Kópavogi.

On

Hún á hest og býr í Kópavogi.

Last two wordslastWords

Puts a no-break space between the last two words of the text, so the last line is never a single word. This rule is off by default, so this row turns it on. Prefer text-pretty where the browser supports it.

Off

Þau fóru saman til Akureyrar

On

Þau fóru saman til Akureyrar

Quotesquotes

Straight double quotes become „…“. A pair of straight single quotes, the mark for a word’s meaning, becomes ‚…‘. A quote with no partner stays as typed.

Off

Hann sagði "komdu" og orðið fákur merkir 'hestur'.

On

Hann sagði „komdu“ og orðið fákur merkir ‚hestur‘.

Dashesdashes

A hyphen in a range becomes an en dash, with an invisible word joiner after it, so the range stays on one line. A spaced hyphen becomes a spaced en dash, with a no-break space before it.

Off

Opið 1990-2010 og kl. 14.30-16.00, lokað 18.-21. ágúst - nema um helgar.

On

Opið 1990–⁠2010 og kl. 14.30–⁠16.00, lokað 18.–⁠21. ágúst – nema um helgar.

Every rule is a localeDetails option: false turns one off, and true turns on one that is off by default. Pass the options to <Hyphenate>, or to localeDetails() on a string.

Switching rules
import { localeDetails } from "skiptingar";
import { Hyphenate } from "skiptingar/react";

<Hyphenate localeDetails={{ units: false, singleLetter: true }}>
  <p>Verð 1.000 kr. og 5 km leið.</p>
</Hyphenate>;

localeDetails("Þau fóru saman til Akureyrar", { lastWords: true });

Real interfaces

Real interface problems, such as a heading at phone width.

Heading, phone width

Without the package a long compound runs out of the box. With it the word breaks where the patterns allow, and text-wrap: balance evens out the lines when the text-wrap switch is on. Why, with and without

Withoutthe browser alone

Vaðlaheiðarvegavinnuverkfærageymsluskúr

Hraðbrautarframkvæmdir á landsbyggðinni

With Skiptingarpage settings

Vaðla­heiðar­vega­vinnu­verk­færa­geymslu­skúr

Hrað­brautar­fram­kvæmdir á lands­byggð­inni

Card grid

Narrow cards with long names. Without the package the names run out of the cards.

Withoutthe browser alone
  • Heilbrigðisráðuneytið

    Heilbrigðisþjónusta um allt land.

  • Grunnskólakennarar

    Kennsla og skólastarf.

  • Náttúruverndarsvæði

    Friðlönd og þjóðgarðar.

  • Ferðaþjónustufyrirtæki

    Ferðir og afþreying.

  • Sveitarstjórnarkosningar

    Kosið var 16. maí 2026.

  • Hæstaréttarlögmaður

    Málflutningur fyrir dómstólum.

With Skiptingarpage settings
  • Heil­brigðis­ráðu­neytið

    Heil­brigðis­þjón­usta um allt land.

  • Grunn­skóla­kenn­arar

    Kennsla og skóla­starf.

  • Nátt­úru­verndar­svæði

    Frið­lönd og þjóð­garðar.

  • Ferða­þjón­ustu­fyrir­tæki

    Ferðir og af­þrey­ing.

  • Sveitar­stjórnar­kosn­ingar

    Kosið var 16. maí 2026.

  • Hæsta­réttar­lög­maður

    Mál­flutn­ingur fyrir dóm­stólum.

Mixed languages

The two English phrases sit in <span lang="en">. The · marks show the result: the Icelandic words get breaks, and the English words stay whole.

Enska orðið internationalization og orðasambandið accessibility guidelines haldast óbreytt, en íslensku orðunum er skipt milli lína.

Type sizes

The first paragraph of your text at three sizes, in the same width. Smaller type fits more letters on a line, so the breaks change.

text-display

Kjör­sókn í sveitar­stjórnar­kosn­ing­unum 16. maí 2026 var sú mesta sem mælst hefur í Hrafna­fjarðar­byggð, 91,4%. Á ár­unum 1990–⁠2010 var hún að jafn­aði um 78%. „Þetta er sögu­leg niður­staða,“ sagði dr. Guð­rún Sig­urðar­dóttir, for­maður yfir­kjör­stjórnar, á blaða­manna­fundi kl. 14.30 dag­inn eftir.

text-prose

Kjör­sókn í sveitar­stjórnar­kosn­ing­unum 16. maí 2026 var sú mesta sem mælst hefur í Hrafna­fjarðar­byggð, 91,4%. Á ár­unum 1990–⁠2010 var hún að jafn­aði um 78%. „Þetta er sögu­leg niður­staða,“ sagði dr. Guð­rún Sig­urðar­dóttir, for­maður yfir­kjör­stjórnar, á blaða­manna­fundi kl. 14.30 dag­inn eftir.

text-meta

Kjör­sókn í sveitar­stjórnar­kosn­ing­unum 16. maí 2026 var sú mesta sem mælst hefur í Hrafna­fjarðar­byggð, 91,4%. Á ár­unum 1990–⁠2010 var hún að jafn­aði um 78%. „Þetta er sögu­leg niður­staða,“ sagði dr. Guð­rún Sig­urðar­dóttir, for­maður yfir­kjör­stjórnar, á blaða­manna­fundi kl. 14.30 dag­inn eftir.

Same text, every browser

Skiptingar decides where text may break. The browser decides whether it needs to.

NoneBreaks only at spaces, so long words stick out or leave gaps.

Kjörsókn í sveitarstjórnarkosningunum 16. maí 2026 var sú mesta sem mælst hefur í Hrafnafjarðarbyggð, 91,4%. Á árunum 1990-2010 var hún að jafnaði um 78%. "Þetta er söguleg niðurstaða," sagði dr. Guðrún Sigurðardóttir, formaður yfirkjörstjórnar, á blaðamannafundi kl. 14.30 daginn eftir.

Browserhyphens: auto, with the browser’s own dictionary. Only Firefox has an Icelandic one, so in Chrome, Edge and Safari this column looks like None. Open the page in Firefox to see it hyphenate.

Kjörsókn í sveitarstjórnarkosningunum 16. maí 2026 var sú mesta sem mælst hefur í Hrafnafjarðarbyggð, 91,4%. Á árunum 1990-2010 var hún að jafnaði um 78%. "Þetta er söguleg niðurstaða," sagði dr. Guðrún Sigurðardóttir, formaður yfirkjörstjórnar, á blaðamannafundi kl. 14.30 daginn eftir.

SkiptingarSoft hyphens from the letter patterns and better breaks, put in on the server. Every browser gets the same break points.

Kjör­sókn í sveitar­stjórnar­kosn­ing­unum 16. maí 2026 var sú mesta sem mælst hefur í Hrafna­fjarðar­byggð, 91,4%. Á ár­unum 1990–⁠2010 var hún að jafn­aði um 78%. „Þetta er sögu­leg niður­staða,“ sagði dr. Guð­rún Sig­urðar­dóttir, for­maður yfir­kjör­stjórnar, á blaða­manna­fundi kl. 14.30 dag­inn eftir.

How it works

Three layers on the server: letter patterns, better breaks and locale details. CSS text-wrap, below, sets the lines.

One word, from the text to the line
  1. 1Word

    On the server
    Hrafnafjarðarbyggð

    Any Icelandic word. No word list is needed.

  2. 2Letter patterns

    On the server
    Hr2a2fn2a1f2j2ar2ð1ar3byg2gð

    Each gap between letters takes the highest digit of any pattern that covers it.

  3. 3Minimums

    On the server
    Hrafnafjarðarbyggð

    The Ritreglur minimums need room on both sides: at least 1 letter before a break and 2 after, in words of 4 letters or more.

  4. 4Better breaks

    On the server
    Hrafnafjarðarbyggð

    It drops breaks that read badly, here the one inside fjarð-ar.

  5. 5Locale details

    On the server
    „Verð 1.000 kr.“

    Spaces become no-break spaces and straight quotes become Icelandic quotes, here in another phrase.

  6. 6HTML

    On the server
    Hrafna&shy;fjarðar&shy;byggð

    An invisible soft hyphen at each break, and the no-break spaces from the locale details.

  7. 7Line

    In the browser

    Kjör­sókn í Hrafna­fjarðar­byggð

    The browser picks the break that fits and draws the hyphen only there. CSS text-wrap shapes the choice, as CSS it pairs with explains.

  • Letter patterns

    This is Franklin Liang’s algorithm from 1983, the one TeX uses. It needs no word list. 23.139 short letter patterns carry numbers between the letters, like .af4lið. (the dots mark the start and end of the word). An odd number allows a break and an even number forbids one. The highest number at each spot wins. The 2020 patterns break some words better than the older TeX patterns: the table in Reference shows where. The official spelling rules (Ritreglur) then ask for room on both sides of a break, the Minimums stage above. These minimums alone still allow breaks that read badly, such as ó-lán.

  • Better breaks (on by default)

    Better breaks keep only some of the legal breaks. Words need 6 or more letters, with 2 before a break and 3 after, so ólán stays whole. The break before a linking syllable (ar, ur, is, ir) goes, so sveitar-stjórnar-kosn-ingum keeps its genitives. A foreign name with c, q or w stays whole.

  • Locale details

    Locale details are on by default in the components and the hooks. Pass localeDetails={false} to hyphenate only. Hyphenation does not depend on them. Locale details swap characters one for one: spaces become no-break spaces in 1.000 kr., 30. september, bls. 12 and dr. Jón, and straight quotes become Icelandic „…“. The dashes rule is the one exception: it also adds an invisible word joiner after an en dash in a range. So the locale details can run across a whole JSX tree and pair quotes across inline elements such as <strong>.

  • Soft hyphens, on the server

    hyphenate() puts the soft hyphens in while the page renders, in a React Server Component called <Hyphenate>. The browser still picks which break to use on each line.

  • Why on the server

    All three layers run while the page renders, so the browser gets plain HTML. That means 0 kB of JavaScript for any of them on a server-rendered page, the same break points in every browser, and no flash while text is processed. <CleanCopy /> keeps copied text clean: it removes the soft hyphens and the invisible word joiner (U+2060), and turns no-break spaces and no-break hyphens back into normal ones. Icelandic quotes and dashes stay, because they are the right characters.

Result

The real output for the heading in A first page. Each · is a soft hyphen.

Sveitarstjórnarkosningar á landsbyggðinni

CSS it pairs with

These CSS properties decide how the browser uses the breaks. I recommend text-wrap: pretty for body text and balance for titles. This is your CSS, not package code, and it is optional. Each pair sets the same text at the same width, without and with the property. Drag the width: at some widths the two agree, at others they differ.

text-wrap: pretty

Stops a paragraph from ending on one short word. Safari 26 and later also even out the right edge. Chrome adjusts only the last few lines.

Used here
The paragraphs in Real interfaces, the steps on this page and the body text in Try it.
Support
Chrome 117+ and Safari 26+ support it. Firefox does not and falls back to normal wrapping. The locale details rule lastWords does part of the same job, for the last two words only. Use it as a fallback for Firefox and older Safari.
Withouttext-wrap: wrap
Withtext-wrap: pretty

text-wrap: balance

Evens out the line lengths of a short block, so a heading of two or three lines does not end on one word.

Used here
The section titles, the titles in Try it and the heading samples.
Withouttext-wrap: wrap

Nýr vegur opnaður á milli bæjanna

Withtext-wrap: balance

Nýr vegur opnaður á milli bæjanna

hyphens: manual and auto

manual, the CSS default, adds a hyphen only at a soft hyphen. Skiptingar puts those in. auto asks the browser’s own dictionary.

Used here
Every hyphenated text on this page uses manual. The Browser column in Same text, every browser uses auto on purpose, and says what that does for Icelandic.
Withouthyphens: auto
Withhyphens: manual, with Skiptingar

lang

Tells screen readers which language to speak and the browser which language rules to use. hyphens: auto needs it.

Used here
Every Icelandic container on this page. The English interface text has none.
HTML
<p lang="is">Hraðbrautarframkvæmdir</p>

Install

Three entry points: the JavaScript API, the React components and the browser API.

Install
Package manager
bun add skiptingar

Version 0.4.0 on npm · GitHub · Changelog · Issues · MIT licence. The API may still change before 1.0.

A first page

Wrap the text in <Hyphenate> where the page renders on the server. It adds all three layers. Pass localeDetails={false} to leave out the locale details. The CSS text-wrap here is Tailwind’s text-balance for the title and text-pretty for the paragraph. Add <CleanCopy /> once, so copied text has no soft hyphens.

app/page.tsx
import { Hyphenate } from "skiptingar/react";
import { CleanCopy } from "skiptingar/client";

export default function Page() {
  return (
    <main lang="is">
      <CleanCopy />
      <Hyphenate>
        <h1 className="text-balance">Sveitarstjórnarkosningar á landsbyggðinni</h1>
        <p className="text-pretty">Verð 1.000 kr. frá 30. september.</p>
      </Hyphenate>
    </main>
  );
}

What <Hyphenate> changes

It changes only the text in the JSX it is given. Everything else stays as you wrote it.

  • Skipped

    code, pre, kbd, samp, var, script, style, textarea, svg, math and any element with translate="no".

  • Switched off

    data-skiptingar="off" on an element or a component turns its whole subtree off.

  • Inline or block

    A component counts as inline when it sits among text, and as a block otherwise. data-skiptingar="inline" or "block" on it decides instead.

  • Child components

    It cannot see text that a child component renders on its own. Wrap that text in its own <Hyphenate>, or pass the component a string from hyphenate().

  • Other languages

    Text under a nested lang other than Icelandic is left alone. A nested lang="is" turns it back on.

Entry points

Import only what the page needs. The first two run on the server and send nothing to the browser. What each setup costs a browser is in Reference.

  • skiptingarAnywhere: Node, the edge, a build step

    hyphenate(), localeDetails() and processSegments(): plain functions on strings. hyphenate() takes a betterBreaks option (on by default, off for the official Ritreglur minimums only), options for the limits and the hyphen character, and a dictionary of your own words.

  • skiptingar/reactReact Server Components

    <Hyphenate> (all three layers) and <LocaleDetails> (locale details only). They change only the text in the JSX you give them.

  • skiptingar/clientThe browser

    useHyphenate() for text that exists only in the browser. It can ask your server, set up below, instead of loading the patterns. The entry also holds <CleanCopy />. The hyphenation core loads on first use and is 49.6 kB brotli, or 51.8 kB with the client entry.

Browser text, hyphenated by your server

Mount the handler on a POST route and point the client at it once. useHyphenate() and its sibling hooks then send their text to your server and get it back hyphenated, so the browser downloads no patterns. By default a request holds up to 200 items and 50.000 characters, and no word may be longer than 200 characters. A request with a longer word is refused. If the endpoint fails, the hooks load the patterns in the browser instead.

Route and client setup
// app/api/skiptingar/route.ts
import { handleSkiptingarRequest } from "skiptingar";

export const POST = (request: Request) => handleSkiptingarRequest(request);

// a client file, run once
"use client";
import { configureSkiptingar } from "skiptingar/client";

configureSkiptingar({ endpoint: "/api/skiptingar" });

On the server you need Node 18 or newer, and there is no browser limit. No runtime dependencies. ESM only. Only skiptingar/react and skiptingar/client need React 18 or newer (tested with React 19). The locale details use regular expression lookbehind, so a browser needs Safari 16.4 or newer. Chrome 62 and Firefox 78 support it earlier, so Safari sets the limit. In the browser only the patterns that the client loads lazily need it. <CleanCopy /> and endpoint mode do not. MIT licence. The hyphenation patterns are CC BY 4.0, so keep their credit. The word data is CC0.

Reference

What each setup costs a browser, the pattern sources, how the sizes are measured and what is planned.

Scroll the table sideways for the 2020 column.

TeX patterns vs 2020 patterns
WordTeX hyphen/is2020 Árni Magnússon
þjóðfélagsumræðaþjóð-fé-lagsum-ræðaþjóð-fé-lags-um-ræða
hraðbrautarframkvæmdirhrað-brautar-fram-kvæmd-irhrað-braut-ar-fram-kvæmd-ir
ólánólánó-lán
íþróttafélagiðíþrótta-fé-lag-iðí-þrótta-fé-lag-ið
óhjákvæmilegtóhjá-kvæmi-legtó-hjá-kvæmi-legt
VaðlaheiðarvegavinnuverkfærageymsluskúrVaðla-heið-ar-vega-vinnu-verk-færa-geymslu-skúr(same)

TeX here keeps its usual limit of 2 letters before a break. The 2020 data has its own limit of 1, so ó-lán and í-þrótta show only in the 2020 column. The 2020 data also fixes the break after lags in þjóðfélagsumræða.

  • What makes the uneven right edge of a paragraph look good, with hyphens where they help. A live demo draws the plain text faintly behind the improved one.

  • CSS text-wrap: prettyChrome for Developers

    Chrome’s version. Near the end of a paragraph it adjusts hyphenation and earlier lines, so its effect shows at some widths and not at others.

  • CSS text-wrap: balanceChrome for Developers

    When to balance a title. Use it for titles and captions, not paragraphs.

  • HyphenationButterick’s Practical Typography

    A counterpoint: in text with an uneven right edge, hyphenation is optional, and headings are better without it. Skiptingar only offers the places to break. You choose which text gets them.

  • The thesis behind the patterns Skiptingar uses. It is why no word list is needed.

  • § 33 OrðskiptingRitreglur, Árnastofnun

    The official rules for breaking Icelandic words between lines. Skiptingar follows them through the patterns, which miss a few breaks and allow a few that the rules forbid.

  • Hangs an opening „ outside the text’s edge, so a line that starts with a quote still lines up. Few browsers support it. The rest ignore it, so it is safe to add.

  • TypesetDavid Merfield

    A server-side HTML pre-processor for hanging punctuation, optical margin alignment and small caps. It has its own quotes and hyphenation. Turn off quotes and hyphenate and let Skiptingar do those for Icelandic.

  • HyphenopolyMathias Nater

    Hyphenation for many languages, in the browser or Node. It has Icelandic too, from the older TeX patterns. Skiptingar leaves text under another lang alone, so the two can share a page.

  • A neural model that finds where a compound’s parts meet. Use it to check a break.

  • Spelling and grammar checking for Icelandic, in Python. Correct the text first, then set it.

Icelandic on the platform

The browser does some things for Icelandic and not others. These notes say what to use instead of writing it yourself.

  • Dates and numbers

    Chrome and Edge on the desktop have no Icelandic Intl data. In a test on macOS, Chrome 154 showed dates in English, and Intl.Collator("is") sorted æ next to a and ö with o, and á, é and í as plain a, e and i. Node, Bun, Firefox and Safari work as they should. Format dates and numbers on the server. For sorting in the browser, use cldr-is (on GitHub, not on npm yet).

  • Plurals

    Intl.PluralRules("is") works everywhere. It treats 21, 31 and 101 as singular, as Icelandic does.

  • Slugs

    slugify (the npm package) already maps þ to th, ð to d, æ to ae and ö to o, as the ÍST 130 table does.

  • Names in a sentence

    Forms like til Jóns and Jóni need declension. Use beygla.

  • Kennitala

    Format it, but do not validate the check digit. Þjóðskrá stopped using it for new numbers on 18 February 2026. See kennitölur án vartölu.

  • Phone numbers

    588-5522 breaks after the hyphen in a browser. The locale details keep it whole.

What it costs a browser

What a page downloads for each job, with Skiptingar and with the common alternatives. With the endpoint, the browser downloads the patterns only if it can’t reach your server. This page uses it.

Hyphenate Icelandic

  • Skiptingar on the serversoft hyphens in the HTMLHyphens go in while the page renders.
    0 kB
  • Skiptingar via your serversoft hyphens from your serveruseHyphenate with an endpoint: the browser sends the text and gets it back hyphenated.
    2.3 kB
  • hyphen/isadds soft hyphens in the browserThe old TeX patterns.
    12.9 kB
  • Hyphenopolyadds soft hyphens in the browserThe old TeX patterns as WebAssembly. It loads where the browser cannot hyphenate.
    14.8 kB
  • Skiptingar in the browseradds soft hyphens in the browserThe 2020 data, for a page with no server to ask. It loads on first use. It is larger than the old patterns because it breaks better.
    51.8 kB

Locale details

  • Skiptingar on the serverswaps characters in the HTMLIcelandic numbers, dates, abbreviations and quotes.
    0 kB
  • Typesetrewrites the markupEnglish rules. It runs in the browser here.
    29.7 kB

The Skiptingar rows come from bun run size and change with each run. The other packages were measured on 1 October 2026. Each row shows only what that setup downloads for its job, so the scope differs: some rows include hyphenation, and some leave it to the server. All sizes are brotli. How they are measured: Sizes, under How it is checked.

Data and rules

  • One-letter breaks

    The Ritreglur rules for breaking after one letter, as in ó-lán, follow skiptir, the Python package.

  • Safety

    The three layers never touch URLs, email addresses or domains. Running any of them twice gives the same result.

  • Languages and letters

    Other languages: see What <Hyphenate> changes. A page in another language passes its own lang prop. Input becomes NFC first, so decomposed letters, like those in macOS file names, still hyphenate.

Support

  • Browsers and Node

    The Node and browser versions are listed with the requirements under Entry points.

  • Fonts

    Check that your font has glyphs for U+00A0, the no-break space, and U+2011, the no-break hyphen. localeDetails() puts U+2011 in kennitala and phone numbers. Many fonts have no U+2011. ABC Areal and Bespoke Serif, the faces on this page, lack it. The browser draws that hyphen from a fallback font.

  • Screen readers

    Screen readers differ on soft hyphens. NVDA has been reported to announce them, so test with yours.

How it is checked

  • Tests

    617 tests. Counted from a real run of bun test on the package folder. bun run tests:count writes the numbers to tests.json. This page reads them from there.

  • Sizes

    bun run size builds a small entry for each way to use the package. Like a site’s bundler, it minifies the code, splits it into chunks and leaves React out. It adds up the files that load at once and, for the browser setup, the chunks that load later. It compresses each file on its own with brotli (quality 11) and gzip (level 9), as a browser downloads it, and rounds the sum to 0.1 kB. Shared code counts in every setup that uses it. The other packages in the chart are bundled the same way, each with a minimal use. The sizes of Skiptingar come from sizes.json, which the script writes.

  • Source

    The code, the tests and these scripts are in geirolafs/skiptingar on GitHub.

Planned

What comes next, and what can wait. Nothing here is promised.

Next

  • This page as the documentation

    Every option live, with the API reference beside it.

Later

  • Markdown and HTML

    A rehype plugin and a small CLI that hyphenate and add the locale details, for sites that are not built with React.

  • More opinionated breaks

    The first version follows the official spelling rules and adds better breaks. Later: a list of words with corrected breaks, a skip for all-caps acronyms such as UNESCO, and a heading mode that breaks a title where its compounds join.

  • Smaller patterns, maybe

    Train a smaller pattern set from the same 218.308-word list. It gives up a little accuracy for size, for pages that must hyphenate in the browser without a server. Only if size matters.