RegEx Tester - Online Regular Expression Builder & Matcher
Build and test regular expressions against sample text. Real-time match highlighting, capture groups display, and flavor options. All inside your browser.
UD5 Toolkit
Parse, visualize & understand your browser's language negotiation headers. See exactly how servers interpret your locale preferences.
navigator.languages API — approximates what your browser sends.
The Accept-Language header is an HTTP request header sent by the browser to tell the server which natural languages and locale variants the user prefers. It follows the format defined in RFC 7231, allowing the server to perform content negotiation—serving the most appropriate language version of a webpage to each visitor. For example, a typical Accept-Language header might look like: en-US,en;q=0.9,fr;q=0.7.
The q-value (quality value) ranges from 0.0 to 1.0 and indicates the user's relative preference for each language. A q=1.0 (or no q-value specified) means the highest preference. Lower values like q=0.5 indicate a secondary preference—"I'd accept this language, but only as a fallback." For example, in en-US,en;q=0.9,fr;q=0.5, the user most wants US English, will accept generic English at 90% preference, and will reluctantly accept French at 50% preference if nothing better is available.
Each browser manages language preferences differently:
Chrome: Settings → Languages → Add languages, then drag to reorder by preference.
Firefox: Settings → General → Language → Choose your preferred languages and set the priority order.
Safari: Safari → Preferences → Advanced → Language (or system-level: System Preferences → Language & Region).
Edge: Settings → Languages → Add languages and reorder them. The top language becomes your primary preference with implicit q=1.0.
When a server receives an Accept-Language header, it performs server-driven content negotiation: it compares the user's language preferences against the available translations of the requested resource. The server typically picks the highest q-value language that it supports. If no match is found, it falls back to a default language (often English) or returns a 406 Not Acceptable response. Many web frameworks like Express.js (via accepts library), Django, and ASP.NET have built-in locale negotiation middleware.
If none of the languages in your Accept-Language header match the server's available translations, the server will serve its default language version—usually the site's primary language (often English). Some websites also implement IP-based geolocation as a secondary signal for locale detection. Additionally, many sites use cookies or URL parameters (like ?lang=fr) to let users manually override the negotiated language.
You can test your website's language negotiation by:
1. Using this tool to construct and visualize different Accept-Language headers.
2. Using browser DevTools → Network conditions → override the Accept-Language header manually before making requests.
3. Using cURL with a custom header: curl -H "Accept-Language: fr-CH,fr;q=0.9" https://yoursite.com
4. Browser extensions like "Locale Switcher" that let you quickly switch between language profiles for testing.
en is a macrolanguage tag that matches any English variant, while en-US specifically requests American English. The server's matching algorithm typically treats en as a broader match—it can match en-US, en-GB, en-AU, and any other English locale. In contrast, en-US is more specific and may only match content explicitly tagged as American English. Including both in your Accept-Language (e.g., en-US,en;q=0.9) gives the server flexibility while still expressing your regional preference.
Yes! The wildcard * can be used in Accept-Language to indicate "any language is acceptable." For example: en-US,en;q=0.9,*;q=0.1 means "I strongly prefer English, but I'll accept literally anything else if English isn't available." The wildcard is typically given a very low q-value (like q=0.1) as a last-resort fallback. Without a wildcard, if no languages match, the server may return a 406 Not Acceptable status—though in practice most servers serve a default language instead.
Browsers send multiple languages because most users have graded preferences. You might be fluent in multiple languages at different levels. For instance, a Swiss user might prefer Swiss French (fr-CH), then standard French (fr), then Swiss German (de-CH), and finally accept English (en) as a fallback. Listing multiple languages with descending q-values gives the server the best chance of serving content the user can actually understand, while still respecting their primary preference.
For SEO, Accept-Language plays a role in multilingual and multiregional websites. Google recommends:
• Using separate URLs for different language versions (e.g., /en/, /fr/) with hreflang tags rather than relying solely on Accept-Language negotiation.
• Avoiding automatic redirects based on Accept-Language alone, as this can confuse search engine crawlers and prevent indexing of all language variants.
• Using Accept-Language as a supplementary signal—suggesting a language version to the user while keeping all versions crawlable via clear URL structures and hreflang annotations.
Build and test regular expressions against sample text. Real-time match highlighting, capture groups display, and flavor options. All inside your browser.
Convert a flat JSON object into an INI file format with sections and keys. Useful for legacy configs. Local only.
Paste Jira/Confluence wiki markup and get a rendered HTML preview. Supports headings, lists, links, and code blocks. All local.
Shows the decimal and hex code point for every character in a string, including emojis. Copy as array. Dev reference.
Map English letters to fancy mathematical or ornamental Unicode symbols. Create Facebook/Twitter bio art. All local.
Convert title to URL slug with options: ignore stop words, transliterate special characters, choose separator. SEO friendly.
Browse the fonts installed on your system and type a custom phrase to see how it looks. Uses Local Font Access API where available.
Write a standard README with pre‑filled sections like Installation, Usage, and License. Export as Markdown. Save time.
Pick two colors and mix them in different color spaces with sliders. See the difference between sRGB and OKLCH mixing. Copy the code.
Paste code and get a beautifully highlighted preview with line numbers. Supports many languages. Copy as HTML. Pure frontend.
Paste INI content and convert it to a structured JSON object. Handles sections and comments. Client‑side only.
Write a module and import it. See how browser handles module scripts. Learn modern JS structure.
Convert any text to snake_case, kebab‑case, camelCase, or PascalCase. Essential for programming variable naming. Local.
Write CSS like `oklch(from red l c h)` to modify colors. Preview the output and copy. Modern color manipulation.
Convert normal text into various Unicode styles (bold, italic, script, fraktur). Copy and paste anywhere. No font install needed.
Paste an SSL certificate and private key to verify they belong together. Check if a CSR matches a private key. All local crypto.
Paste text with \uXXXX or \xXX escape sequences and decode to readable characters. Works for all Unicode planes.
Press any key combination and see the human‑readable shortcut for macOS and Windows. Developer docs helper.
Enter a URL and see a nested list of all headings (h1‑h6). Check your document structure for SEO and accessibility. Pure fetch.
Pick a COLRv1 color font and change its palette with font‑palette. Create custom palettes with @font‑palette‑values.
Pick an emoji and get the exact CSS content property value with escaped Unicode. For inserting emojis via CSS.
Pick two images or colors and apply all 16 CSS mix‑blend‑mode values live. See and copy the right CSS for your design.
Convert hex, RGB, or HSL into the modern OKLCH color space. See the preview and copy CSS oklch() value. Local.
Design a custom focus indicator with outline, offset, and box‑shadow. Preview on interactive elements. Copy the CSS.
Write scoped CSS rules that apply only within a subtree. See the boundary limits and avoid naming conflicts. New browser feature.
Enter a URL and see a nested list of all h1‑h6 tags. Check document structure for SEO and accessibility.
Search by MIME or file extension to see the corresponding type. Helpful when configuring web servers. Static.
Visually apply CSS transform functions like rotate, scale, skew, and translate. Obtain the exact CSS code for your elements. No coding needed.
Type a word like 'sunset' or 'calm' and generate a color palette inspired by that mood. Simple associative mapping.
Paste Pug template code and compile it to HTML. See the rendered output instantly. For static site devs.