Skip to content
✦TextLib
Free Keyboard Guide

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.

FAQ

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!