OSI Model — Presentation Layer
Two applications rarely speak the same format. One stores characters in ASCII, the other in EBCDIC; one holds a JPEG, the other expects a bitmap. The presentation layer is the translator, the cipher, and the compressor of the OSI stack. This lesson covers what it does and how much of it still appears in real networks.
The role of the layer
The presentation layer is Layer 6 of the OSI model. It has one overall purpose: to make sure the data a sender produces can be understood by the receiver. It performs three families of job:
- Translation and formatting — converting data between application formats and encodings (for example, ASCII to EBCDIC, or a character stream to a byte layout).
- Encryption and decryption — protecting data so it cannot be read in transit.
- Compression and decompression — reducing the size of data so it uses less bandwidth.
An old name for this layer is the syntax layer, because its central job is agreeing on the form of the data, not its meaning. The application layer cares what a message means; the presentation layer cares how those bits are laid out and encoded.
Character encoding
Text is the most familiar example of a format problem. A computer stores letters as numbers, and there are several numbering schemes. If two systems disagree, the same bytes render as garbage.
| Encoding | Size | Notes |
|---|---|---|
| ASCII | 7 bits (often stored in 8) | American Standard Code for Information Interchange; 128 codes covering English letters, digits, punctuation, and control characters. |
| Extended ASCII | 8 bits | 256 codes; adds accented letters and symbols but is not standardised across vendors. |
| EBCDIC | 8 bits | Extended Binary Coded Decimal Interchange Code; an IBM mainframe encoding, assigned different values than ASCII. |
| Unicode (UTF-8) | Variable (1–4 bytes) | One universal character set covering hundreds of thousands of characters across scripts; UTF-8 is backwards-compatible with ASCII. |
The classic teaching example is a text file created on an ASCII system being read on an EBCDIC system. Without translation the letters come out meaningless, because the same number maps to a different character. The presentation layer is what fixes this by converting one encoding into the other. Unicode/UTF-8 largely solved the problem at the source by giving every character in every script a single, agreed code point.
Data formats and codecs
Beyond text, the layer concerns standard representations for many kinds of data:
- Images: JPEG, GIF, PNG, TIFF.
- Video: MPEG, H.264/AVC, H.265/HEVC, VP9, AV1.
- Audio: MP3, AAC, WAV.
- Documents and data: HTML, PDF, XML, JSON.
- Email attachments: MIME, which encodes binary data so it can travel in text-based mail.
A codec is the pair of algorithms that encodes and decodes one of these formats. The presentation layer conceptually owns the job of ensuring both ends agree on the codec, so that a video encoded with one standard is decoded with the same one.
Compression
Compression reduces the size of data so it transfers faster and consumes less storage. There are two kinds, and the exam expects you to know the difference:
| Type | Behaviour | Examples |
|---|---|---|
| Lossless | Shrinks data with no information lost; the original is restored exactly. | PNG, ZIP, gzip |
| Lossy | Discards detail the eye or ear is unlikely to notice; the original cannot be restored exactly. | JPEG, MP3, MP4 video |
Encryption and SSL/TLS
Encryption transforms readable data (plaintext) into an unreadable form (ciphertext) so an eavesdropper cannot use it; decryption reverses the process for the intended receiver. In the original OSI literature, encryption and decryption were placed at the presentation layer, and the SSL/TLS family is the usual example given.
The modern, accurate view is more subtle:
- TLS (and its predecessor SSL) does not run inside a separate presentation layer. It runs as a security protocol layered above TCP (or above UDP for DTLS), sitting between the transport layer and the application. HTTPS is simply HTTP running over a TLS-protected connection on port
443. - Because TLS manages a session (a handshake, agreed keys, and a renegotiation lifecycle) as well as encryption (a representation function), it conceptually spans the session and presentation functions at once. In the four-layer TCP/IP model it is grouped into the application layer, because that is where its users live.
How real stacks implement it
The presentation layer is largely conceptual. The TCP/IP model does not have a separate presentation layer; it folds Layers 7, 6, and 5 into a single application layer.
In practice its jobs are done inside applications and libraries: a browser decodes a JPEG and renders text; an HTTPS library performs the TLS handshake; a video player decompresses a stream. The exam still asks about Layer 6, so you need the functions and examples — just understand that they are usually implemented as part of the application rather than as a distinct protocol layer.
Review
Check what you have learned with these review questions. The key terms and sources from this lesson are listed below the quiz.
| Key term | Meaning |
|---|---|
| Presentation layer | Layer 6 of OSI; handles data representation, encryption, and compression. |
| Character encoding | A scheme mapping characters to numeric codes (ASCII, EBCDIC, Unicode). |
| Codec | The encoder/decoder pair for a media format. |
| Lossless compression | Compression that restores the original data exactly. |
| Lossy compression | Compression that discards some information to save space. |
| TLS | Transport Layer Security; encrypts application data and is layered above TCP. |
Sources & references
- Braden, R. RFC 1122: Requirements for Internet Hosts — Communication Layers (1989), on the layering model. rfc-editor.org/rfc/rfc1122.
- IANA. Service Name and Transport Protocol Port Number Registry (port 443 for HTTPS). iana.org.
- ISO/IEC 7498-1. Information technology — Open Systems Interconnection — Basic Reference Model, which describes the presentation layer. iso.org.
- Cisco. CCNA (200-301) Exam Topics, Network Fundamentals. cisco.com.
Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.