Entering Hyphenated Text in Forms: Hyphens, Dashes and Look-Alike Characters
Why a hyphen typed or pasted into a form can fail validation or search, how dash substitutions change the stored characters, and when plain hyphen-minus is the safer choice.
A hyphenated surname, a part number or a phone number can look correct in a form field and still be rejected, mismatched or stored inconsistently. The usual cause is that the hyphen on screen is not the character the form expects. This review explains what hyphen and dash substitutions actually change, when a typographic dash is worth keeping, and when the plain keyboard hyphen is the better choice for form entry.
Is a dash substitution suitable for form entry?
For most form fields, no. The plain hyphen-minus that a standard keyboard produces is the character that names, identifiers, phone numbers, postal codes and account numbers are most likely to be validated, searched and matched against. Replacing it with an en dash, em dash, true Unicode hyphen or minus sign gains nothing in a short input field and adds a real chance that the entry will be rejected or will fail to match a record elsewhere.
The main benefit of typographic dashes is visual precision in running text: an en dash for ranges, an em dash for a break in a sentence, a minus sign for mathematics. That benefit applies to long-form fields such as comments, descriptions or bios, where the text is read by people rather than parsed by software. The decisive tradeoff is that these characters look nearly identical to a hyphen in many fonts while being different characters to any system that compares, searches or validates text.
- Use the plain hyphen-minus for: names, usernames, email local parts, phone and fax numbers, postal codes, product and order numbers, dates typed as text, and any field with a stated format.
- A typographic dash is reasonable for: free-text fields displayed to readers, where the destination is known to preserve the character and nothing needs to match or search it exactly.
- When unsure, choose plain text. A plain hyphen is never wrong in a form; a substituted dash sometimes is.
What a dash substitution actually changes
This is a character substitution, not a visual effect. When a word processor, keyboard setting or text tool turns a hyphen into a dash, it replaces the stored Unicode code point with a different one. The change travels with the text when it is copied, pasted, submitted and saved. It is not a font, a style or a display setting that disappears when the text moves somewhere else.
The word 'font' is sometimes used loosely for these characters, but a font only controls how a character is drawn. Two different code points can be drawn almost identically by one font, which is exactly why the substitution is easy to miss. The reverse also holds: a font change alone never turns a hyphen into a dash, and it never makes a form treat one as the other.
| Character | Code point | Typical purpose | Risk in a form field |
| Hyphen-minus | U+002D | General hyphen, keyboard default | Expected by most validation and matching |
| Hyphen | U+2010 | Typographic hyphen | Looks identical; often rejected by format checks |
| Non-breaking hyphen | U+2011 | Keeps hyphenated words on one line | Looks identical; may fail matching |
| Figure dash | U+2012 | Dash the width of a digit, in numbers | Can break phone or ID formats |
| En dash | U+2013 | Ranges, such as 10–20 | Common result of autocorrect; frequent mismatch |
| Em dash | U+2014 | Break in a sentence | Visibly longer, but still often pasted by accident |
| Minus sign | U+2212 | Mathematical subtraction | May fail numeric parsing |
| Soft hyphen | U+00AD | Invisible hyphenation hint | Usually invisible; silently breaks exact matches |
| Fullwidth hyphen-minus | U+FF0D | East Asian text layouts | Wider glyph; may be rejected |
Illustrative example: the name Smith-Jones typed directly from a keyboard contains U+002D. The same name copied from a document that applied automatic dash formatting may contain U+2013 between the two parts instead. Both display as a short horizontal stroke between two words, but a database or search comparing them character by character treats them as different strings. No other character in the name changes; the substitution affects only the dash position.
Common sources of substitution include word processors that autoformat hyphens into dashes, mobile keyboards with a smart punctuation option that can turn a double hyphen into an em dash, text copied from web pages or PDFs typeset with typographic dashes, and text tools that offer 'proper' punctuation. Soft hyphens can arrive invisibly in text copied from pages that use them for line breaking.
Will the entry stay readable and usable after copying or submitting?
Readable, usually yes; usable, not reliably. A dash-like character normally displays as some kind of horizontal line wherever it is pasted, so a human reader will rarely notice a problem. The failures show up in software behavior rather than appearance.
- Validation: a field that checks a format such as digits and hyphens may reject an en dash or Unicode hyphen with a generic error that does not identify the character.
- Search and matching: records entered with different dash characters may not be found by a search typed with a keyboard hyphen, and duplicate-detection may treat them as different people or items.
- Downstream systems: a form may accept the character but a later system, export or printed label may substitute, drop or misrender it.
- Editing: invisible soft hyphens can be present inside a field without any visible sign, so deleting and retyping the visible text may leave them behind if the field is not cleared fully.
- Assistive technology: screen readers may announce hyphens, dashes and minus signs differently, or skip them, depending on the reader and its punctuation settings. No scoped testing was available for this review, so specific screen reader behavior is not claimed here.
Because acceptance by one form does not show how other systems will handle the same text, a successful submission is not evidence that the character is safe everywhere the data later goes. Whenever the text needs to be matched, searched or reused, a plain hyphen-minus is the equivalent to keep.
Practical steps for people filling in forms
- Type hyphens directly from the keyboard in short fields rather than pasting them.
- If pasting from a document or web page, paste into a plain text editor first and retype any hyphens or dashes before copying into the form.
- If a hyphenated value is rejected with no clear reason, delete the hyphen and type it again from the keyboard.
- If a mobile keyboard converts double hyphens or other punctuation automatically, check the keyboard's punctuation settings before entering structured data.
- When a field's format instructions show a hyphen, assume they mean the keyboard hyphen-minus.
Notes for people building or evaluating forms
Rejecting look-alike dashes outright frustrates users who cannot see the difference. A common approach is to map dash-like characters to hyphen-minus and remove soft hyphens before validation and storage, while keeping the original if exact preservation matters. Whether to map, reject or keep each character depends on the field: identifiers generally benefit from mapping, while free text may not need it at all.
// Map common dash look-alikes to hyphen-minus and drop soft hyphens
const DASH_LIKE = /[\u2010-\u2015\u2212\uFE58\uFE63\uFF0D]/g;
function normalizeHyphens(value) {
return value.replace(/\u00AD/g, "").replace(DASH_LIKE, "-");
}
Unicode normalization alone does not solve this. NFKC normalization maps fullwidth and small hyphen-minus forms to the ordinary hyphen-minus and maps the non-breaking hyphen to the Unicode hyphen, but it leaves en dashes, em dashes, the Unicode hyphen and the minus sign unchanged. An explicit mapping is needed for those.
Hyphens also matter inside validation patterns themselves. The HTML pattern attribute is compiled with the regular expression v flag in current browser specifications, and under that flag an unescaped hyphen in some character class positions makes the pattern invalid. An invalid pattern is ignored rather than enforced, so a form can silently stop validating. Escaping the hyphen inside character classes avoids this; testing the pattern in the target browsers confirms it.
Evidence gaps
No tool-specific documentation, named form platforms or test results were supplied for this review. The character identities and normalization behavior described above are defined by the Unicode standard; behavior of particular forms, keyboards, databases and screen readers varies and should be confirmed with a scoped test in the actual destination before relying on any dash other than hyphen-minus.