Study vocabulary from this article
Use flashcards with SRS system for long-term retention
In my first ESL classes, students ask about curly brackets with obvious confusion: “Are these important? When do I actually use them?” The honest answer is nuanced. For everyday writing, you’ll rarely use them. But if you’re writing mathematical formulas, reading programming code, or crafting formal academic work, curly brackets serve specific, crucial functions. You’ll walks you through all three contexts — writing, mathematics, and programming — so you know exactly when and why to use them.
Curly brackets, also called braces or curly braces, are one of four bracket types in English. Understanding the full set — parentheses ( ), square brackets [ ], angle brackets < >, and curly brackets { } — will help you read and write across multiple disciplines with confidence.

Key Takeaways
- Four bracket types exist — parentheses ( ), square brackets [ ], angle brackets < >, and curly brackets { }, each with specific purposes.
- In formal writing , curly brackets are rare; they group alternatives or clarify mathematical grouping, but should be used sparingly.
- In mathematics , curly brackets define sets {1, 2, 3}, show order of operations, and represent function domains and ranges.
- In programming , curly brackets are essential; they enclose code blocks, define objects, and structure entire programs.
- Keyboard shortcut — type curly brackets by holding Shift + [ for { and Shift + ] for }, on standard QWERTY keyboards.
Understanding All Bracket Types
Before diving into curly brackets specifically, it’s useful to compare all four bracket types used in English and technical writing. Each has a distinct purpose and appearance.
| Bracket Type | Symbols | Main Uses | Example |
|---|---|---|---|
| Parentheses | ( ) | Add extra information or asides; group elements in mathematics | She went to Paris (her favourite city) last summer. |
| Square brackets | [ ] | Insert clarifications into quotes; array indexing in programming | “He said [the event] was postponed.” (original: “the meeting”) |
| Angle brackets | < > | Email addresses, HTML/XML tags, comparison operators | Email: contact@example.com or
This is HTML. |
| Curly brackets | { } | Sets in mathematics; code blocks in programming; formal grouping | Set A = {1, 2, 3} or for (let i = 0; i < 10; i++) { code } |
Curly Brackets in Formal Writing
In everyday formal English writing, curly brackets are uncommon. However, they have specific legitimate uses in academic and technical writing contexts.
When to Use Curly Brackets in Writing
1. Showing alternatives or options — Curly brackets can indicate that you’re presenting choices or alternatives, though braces or parentheses are more common today.
Example: The conference will be held {Monday or Tuesday}, depending on venue availability.
2. Grouping related items in formal lists — When you need to group items that belong together within a larger context.
Example: The subjects covered include {Mathematics, Physics, Chemistry} in the sciences, and {History, Geography, Economics} in the social sciences.
3. Indicating a correction or editor’s note — In academic or journalistic writing, curly brackets (or sometimes square brackets) can indicate an editor’s insertion or clarification. However, [square brackets] are more standard for this purpose.
Example: The author wrote, “We must address the {environment} crisis immediately.” (The original said “climate” but was changed for clarity.)
Important: Curly Brackets Are Rarely Needed in Modern Writing
Most modern English writing avoids curly brackets. Instead, use:
- Parentheses ( ) for asides and extra information
- Square brackets [ ] for editorial notes and corrections
- Commas or em dashes for grouping related ideas
Instead of: “I need {paper, pens, and notebooks} for school.”
Better: “I need paper, pens, and notebooks for school.” (no brackets needed)
Writing guideline: In standard English essays and formal documents, avoid curly brackets entirely. They belong in mathematics and programming. If you feel tempted to use them in writing, reconsider — parentheses or clear sentence structure usually works better.
Curly Brackets in Mathematics
In mathematics, curly brackets have essential, well-defined functions. They’re part of the standard mathematical notation taught in schools worldwide.
Defining Sets
The most common use of curly brackets in mathematics is to define a set — a collection of distinct objects or numbers.
Example 1: A = {1, 2, 3, 4, 5}
Meaning: Set A contains the numbers 1 through 5.
Example 2: Vowels = {a, e, i, o, u}
Meaning: The set of vowels in English contains these five letters.
Example 3: B = {x | x is an even number between 1 and 10}
Meaning: Set B contains all even numbers from 1 to 10 (2, 4, 6, 8). The vertical line “|” means “such that.”
Order of Operations
In complex mathematical expressions, brackets are used to indicate which operations should be performed first. When multiple bracket types appear together, you work from the innermost to outermost: ( ), [ ], { }.
Example: 3 + { 4 × [2 + (5 – 1)] }
To solve this:
- First, solve the parentheses: (5 – 1) = 4
- Then, solve the square brackets: [2 + 4] = 6
- Then, solve the curly brackets: 4 × 6 = 24
- Finally, add: 3 + 24 = 27
Function Notation
In some mathematical contexts, curly brackets can denote the range or domain of a function — the set of input or output values.
Example: f(x) = {y | y = 2x + 1}
Meaning: The function f produces outputs (y values) by multiplying any input x by 2 and adding 1.
Curly Brackets in Programming
In programming languages such as C, C++, Java, C#, JavaScript, and many others, curly brackets are essential structural elements. They define code blocks and determine how programs execute.
Defining Code Blocks in Loops
In most programming languages, curly brackets enclose the statements that make up a loop. The loop executes the code inside the brackets repeatedly.
C / C++ example:
for (int i = 0; i < 10; i++) {
printf(“%d\n”, i);
}
Explanation: The curly brackets enclose the printf statement. This statement executes 10 times as i counts from 0 to 9.
Defining Functions and Methods
Curly brackets define the body of a function — the code that runs when the function is called.
JavaScript example:
function greet(name) {
console.log(“Hello, ” + name + “!”);
return true;
}
Explanation: When greet() is called, the code inside the curly brackets executes.
Defining Objects and Data Structures
In languages like JavaScript and JSON (JavaScript Object Notation), curly brackets define objects — collections of key-value pairs.
JavaScript object example:
let person = {
name: “John”,
age: 30,
city: “New York”
};
Explanation: This creates an object called “person” with three properties.
Defining Conditional Blocks
Curly brackets also enclose the code that runs if a condition is true.
Python example (note: Python often uses indentation instead of brackets):
if (temperature > 30) {
console.log(“It’s hot!”);
} else {
console.log(“It’s cool.”);
}
Important for programmers: Missing or mismatched curly brackets { } are the most common syntax errors in programming. Always check that every opening bracket { has a matching closing bracket }. Most code editors highlight matching brackets to help you.
How to Type Curly Brackets on a Keyboard
On a standard QWERTY keyboard, curly brackets are located on the same keys as square brackets, accessed using the Shift key.
| Bracket | Keyboard Combination | Key Location |
|---|---|---|
| Left curly bracket { | Shift + [ | Top row, right side |
| Right curly bracket } | Shift + ] | Top row, right side |
Example practice: Hold Shift and press the [ key to get {. Hold Shift and press the ] key to get }.
On non-English keyboards (QWERTY layouts used in different countries), the bracket keys may be in different locations, but the Shift + [ and Shift + ] combination usually still works.
Common Mistakes with Curly Brackets
✗ Incorrect: Please submit your essays {on time or you will lose points}.
✓ Correct: Please submit your essays on time, or you will lose points.
Why: Curly brackets are unnecessary in normal writing. Use a comma or em dash instead.
✗ Incorrect: I need { paper, pens, and ink } for the office.
✓ Correct: I need paper, pens, and ink for the office.
Why: Brackets add nothing here. In normal lists, avoid them entirely.
✗ Incorrect (Programming): for (int i = 0; i < 10; i++) { printf("%d", i);
✓ Correct (Programming): for (int i = 0; i < 10; i++) { printf("%d", i); }
Why: Missing closing bracket causes a syntax error.
Sample Dialogue: Understanding Brackets in Class
Student: I’m confused about these curly brackets in my math homework. Do I really need them?
Teacher: In mathematics, curly brackets define sets — collections of numbers or objects. In your equation, {1, 2, 3} means “the set containing 1, 2, and 3.”
Student: But I see them in my programming class too. Are they the same?
Teacher: Similar idea, but different purpose. In programming, curly brackets enclose blocks of code — they tell the computer which lines belong together.
Student: So I won’t see them in my English essay?
Teacher: Almost never. In English writing, parentheses and square brackets are much more common. Save curly brackets for maths and code.
Quick Quiz
- Which bracket type is most common in formal English writing? → ( ) or [ ] or { }
- In mathematics, what do curly brackets typically denote? → a set / a function / an operation
- In the expression 5 + {3 × [2 + 1]}, which operation do you solve first? → the parentheses / the square brackets / the curly brackets
- In programming, curly brackets are used to enclose what? → comments / code blocks / variable names
- What keyboard combination produces a left curly bracket {? → Shift + [ / Shift + { / Alt + [
Answers: 1. ( ) or [ ] (curly brackets rarely used) · 2. a set · 3. the parentheses (work from innermost outward) · 4. code blocks · 5. Shift + [
Related Articles
- ↑ Master Pillar: English Grammar
- ↑ Back to pillar: English Grammar and Punctuation
Frequently Asked Questions
Are curly brackets the same as braces?
Yes, “curly brackets,” “curly braces,” and “braces” all refer to the same symbols: { }. In British English, “curly brackets” is standard. In American English, “braces” or “curly braces” are also used. All three terms are correct and interchangeable.
Why don’t I see curly brackets in my English textbooks?
Because curly brackets are rare in formal English writing. They belong primarily to mathematics and programming, which are specialized disciplines. In general writing, parentheses ( ), commas, and em dashes — are sufficient for grouping ideas and adding clarifications.
Can I use curly brackets instead of parentheses?
No, not in standard formal English. While they serve similar purposes in some contexts, they are not interchangeable. Parentheses ( ) are the standard choice for asides and extra information in English writing. Reserve curly brackets for mathematics and programming.
What does it mean when a programmer says “missing closing brace”?
It means the code has an opening curly bracket { but no matching closing bracket }. Every opening bracket must have a closing partner, or the program won’t run. This is the most common syntax error in programming.
How are curly brackets used in JSON data?
JSON (JavaScript Object Notation) uses curly brackets to define objects — collections of key-value pairs. For example: {“name”: “John”, “age”: 30} is a JSON object with two properties. JSON is widely used for data storage and transmission on the internet.
Quick Test: Check Your Understanding
5 questions to test what you've learned. No sign-up required.