Skip to content
✦TextLib

How to Type Curly Braces { }

Keyboard shortcuts for Windows, Mac, Chromebook, iPhone & Android. Essential for coding and mathematical notation.

Brackets & Braces to Copy

Click any bracket to copy instantly

Curly braces { } are among the most important characters for programmers and are used constantly in languages like JavaScript, Python, Java, C++, and CSS. They define code blocks, objects, sets, and dictionaries. Outside of programming, curly braces appear in mathematical set notation and template systems.

On US and UK keyboards, curly braces are typed with Shift+[ and Shift+]. However, on many international keyboard layouts — especially German QWERTZ keyboards — they require special key combinations like AltGr+7 and AltGr+0, which can be tricky to remember.

This guide covers every method to type { and } on all major platforms. Whether you're writing code, editing a LaTeX document, or formatting text, you'll find the right shortcut below. All bracket characters on this page are standard Unicode text that works everywhere.

Typing curly braces on US and international keyboards

Curly braces open and close at Unicode points U+007B ({) and U+007D (}). On a US or UK keyboard they share the square-bracket keys, so you hold Shift and press [ for { and ] for }. The layout matters far more here than for most characters: on a German QWERTZ keyboard the braces move to AltGr+7 and AltGr+0, while a German Mac produces them with Option+8 and Option+9. When a shortcut escapes you, both glyphs sit on the "#+=" symbols page of the iPhone and Android keyboards.

Should you need them in web copy rather than in code, the numeric HTML entities { and } render the braces without any risk of them being parsed as markup. Programmers meet curly braces constantly: they wrap blocks in C, Java and JavaScript, delimit objects in JSON, hold rules in CSS, and mark placeholders in template languages like Handlebars ({{name}}). Outside code, mathematicians use them for set notation — {1, 2, 3} — which is why the character earns its place well beyond the developer's editor.

Curly Braces FAQ

The alt code for left curly brace { is Alt+123. For right curly brace }, use Alt+125. Hold Alt, type the number on the numeric keypad, then release. Num Lock must be enabled.

On a German QWERTZ keyboard, press AltGr+7 for { (left curly brace) and AltGr+0 for } (right curly brace). On a German Mac keyboard, use Option+8 for { and Option+9 for }. These are essential shortcuts for programmers using German keyboard layouts.

Parentheses ( ) are used for grouping in math and writing. Square brackets [ ] are used for arrays, indexing, and editorial comments. Curly braces { } define code blocks, objects, and sets. In programming, each type has distinct meaning — mixing them up causes syntax errors.

Curly braces { } define scope and code blocks in most C-style languages (JavaScript, Java, C++, C#, PHP, Rust, Go). They wrap function bodies, if/else blocks, loops, class definitions, and object literals. In CSS, they contain style rules. Missing a curly brace is one of the most common coding errors.

On a US Mac keyboard, press Shift+[ for { and Shift+] for }. On a German Mac keyboard, press Option+8 for { and Option+9 for }. These shortcuts work in all applications including Terminal, Xcode, and VS Code.

Yes! Curly braces { } are standard ASCII characters (Unicode U+007B and U+007D) that work on every platform: Instagram, Twitter/X, Facebook, LinkedIn, and all messaging apps. They display correctly on all devices.

Copied!