Glass

"Glass, you see, can't be broken with regular tools in Minecraft. Well, not without it shattering into a million tiny, invisible shards. Any experienced builder will always cook up more glass than they need for this exact reason - the tiniest slip and you'll have to make a lengthy trip back to the desert for more sand."

- Duncan Geere

Glass is a decorative, fully transparent solid block that can be dyed into stained glass.

Natural generation
Magenta stained glass naturally generates as windows in end cities.

A secret room containing glass can be found inside woodland mansions.

Obtaining
Glass drops itself only if it is broken with a tool enchanted with Silk Touch; otherwise, it drops nothing.

Trading
Villager librarians offer to trade 3 to 5 glass for 1 emerald as part of their tier 3 trades.

Journeyman-level librarian villagers have a 50% chance to sell 3 glass for 1 emerald.

Journeyman-level librarian villagers have a $2/3$ chance to sell 4 glass for 1 emerald.

Usage
Torches and redstone torches can be placed on top of glass, but not attached to their sides.

Glass blocks adjacent to other glass blocks are invisible when viewed through glass.

As a solid block, zombie reinforcements can spawn on top of glass, resulting in unexpected zombies "sneaking into" an otherwise secure area of a structure.

Redstone dust and components can be placed on glass but cannot power glass. Glass can't cut vertical redstone. Vertical redstone can be placed on glass. $$ it will only transmit redstone signal up, not down. Otherwise, glass in redstone circuits is functionally the same as an upside down slab.

ID
Java Edition:

Bedrock Edition:

Block data
In Bedrock Edition, stained glass uses the following data values:

Trivia

 * Before stained glass was added, there was a similar block named tinted glass in the April Fools version 2.0, which had the same use. The texture for the April Fools block was used before it was replaced.