Skip to content
HALOWERK

Textwerk

din5008 formats

Formatting rules of DIN 5008:2020-03 restated in own words from public secondary sources (Wikipedia articles DIN 5008, Datumsformat, Uhrzeit, Rufnummer, Zifferngruppierung, IBAN, Prozentzeichen; Haufe Akademie summary, checked 2026-11-01): date YYYY-MM-DD (preferred), DD.MM.YYYY for domestic recipients, alphanumeric "1. November 2026" without leading zero; time HH:MM[:SS] with two digits and "Uhr" after a protected space, full hours "9 Uhr"; numbers from four digits grouped in threes by a.

POST https://text.halowerk.com/v1/din5008-formats

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
valuesarrayNoValues to format.
textstringNoText to scan for non-conforming dates, times, amounts, percentages, phone numbers and IBANs.
protected_spacesbooleanNoUse no-break spaces (U+00A0) inside numbers and before units as recommended; false uses plain spaces.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "values": {
      "type": "array",
      "maxItems": 100,
      "description": "Values to format.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "date",
              "time",
              "number",
              "amount",
              "phone",
              "iban",
              "percent"
            ],
            "description": "Kind of value."
          },
          "value": {
            "type": [
              "string",
              "number"
            ],
            "description": "date YYYY-MM-DD, time HH:MM or HH:MM:SS, number/amount/percent as number or plain decimal string, iban as string."
          },
          "currency": {
            "type": "string",
            "enum": [
              "EUR",
              "€",
              "Euro",
              "CHF",
              "USD",
              "GBP"
            ],
            "description": "amount: currency designation (default EUR)."
          },
          "decimals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6,
            "description": "number/percent: fixed number of decimals."
          },
          "country_code": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,2}$",
            "description": "phone: country code without + (default 49)."
          },
          "area_code": {
            "type": "string",
            "pattern": "^0?[1-9][0-9]{0,5}$",
            "description": "phone: area or mobile network code (with or without leading 0)."
          },
          "subscriber": {
            "type": "string",
            "pattern": "^[0-9]{2,12}$",
            "description": "phone: subscriber number."
          },
          "extension": {
            "type": "string",
            "pattern": "^[0-9]{1,6}$",
            "description": "phone: direct-dial extension."
          }
        }
      }
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50000,
      "description": "Text to scan for non-conforming dates, times, amounts, percentages, phone numbers and IBANs."
    },
    "protected_spaces": {
      "type": "boolean",
      "default": true,
      "description": "Use no-break spaces (U+00A0) inside numbers and before units as recommended; false uses plain spaces."
    }
  }
}

Open original schema

Published input example

{
  "values": [
    {
      "kind": "date",
      "value": "2026-11-01"
    },
    {
      "kind": "amount",
      "value": 1234.5,
      "currency": "EUR"
    },
    {
      "kind": "phone",
      "area_code": "030",
      "subscriber": "12345",
      "extension": "67"
    }
  ],
  "protected_spaces": false
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →