Character Encoding Converters | UTF-8, Unicode

Compare text, code points and encoded bytes using a short string with a known result.

Quick Answer

Character encoding is the system that turns human-readable text into bytes computers can store, transmit, and interpret.

Character tiles and a computer keyboard

Character Encoding Converters

Convert text between Unicode, UTF-8, UTF-16, UTF-32, ASCII, Latin-1, Windows-1252-style bytes, hexadecimal, binary, decimal bytes, Base64, percent encoding, HTML entities, Unicode code points, and normalization forms. Inspect every character, byte, code unit, and code point in one browser-based tool.

Text to UTF-8 Bytes to text UTF-16 LE/BE UTF-32 LE/BE ASCII / Latin-1 Windows-1252-style HEX / Binary / Decimal Base64 URL percent encoding HTML entities Unicode inspector NFC / NFD / NFKC / NFKD

1. Enter Text or Bytes

Encode mode expects normal text. Decode mode expects bytes in the selected byte input format.

Escape Tool Options

2. Conversion Output

Main output Ready

Convert text and bytes using Unicode-aware browser tools and manual byte encoders.

Characters 0
Code Points 0
UTF-8 Bytes 0
Code Units 0
Character Encoding Flow Text Characters Code Points U+XXXX Bytes HEX / binary UTF-8 keeps Unicode text portable. Inspect code points, code units, and encoded bytes.

Byte / Text Summary

3. Encoding Results

Output Type Value Use Case

Unicode Character Inspector

# Character Code Point Decimal UTF-8 Hex UTF-16 Units HTML Entity
\[ \text{UTF-8 byte count depends on the Unicode code point range.} \]

Character Encoding Formulas

Character encoding converts abstract characters into bytes. Unicode assigns a code point such as \(U+0041\) or \(U+1F44B\), and an encoding such as UTF-8 or UTF-16 decides how that code point becomes bytes or code units.

\[ \text{Character}\rightarrow\text{Code Point}\rightarrow\text{Encoded Bytes} \]

UTF-8 is variable length. It uses one to four bytes depending on the code point range:

\[ U+0000\ldots U+007F \Rightarrow 0xxxxxxx \] \[ U+0080\ldots U+07FF \Rightarrow 110xxxxx\ 10xxxxxx \] \[ U+0800\ldots U+FFFF \Rightarrow 1110xxxx\ 10xxxxxx\ 10xxxxxx \] \[ U+10000\ldots U+10FFFF \Rightarrow 11110xxx\ 10xxxxxx\ 10xxxxxx\ 10xxxxxx \]

UTF-16 uses 16-bit code units. Characters in the Basic Multilingual Plane use one code unit. Supplementary characters use a surrogate pair:

\[ U'=U-0x10000 \] \[ \text{High Surrogate}=0xD800+\left\lfloor\frac{U'}{0x400}\right\rfloor \] \[ \text{Low Surrogate}=0xDC00+(U'\bmod 0x400) \]

UTF-32 uses one 32-bit value per code point:

\[ \text{UTF-32 code unit}=U \]

Base64 encodes three bytes into four printable characters:

\[ 3\ \text{bytes}=24\ \text{bits} \] \[ 24\ \text{bits}=4\times6\ \text{bits} \]

Percent encoding writes each byte as a percent sign followed by two hexadecimal digits:

\[ \text{Byte } b \Rightarrow \%HH \] \[ HH=\operatorname{hex}(b) \]

Unicode normalization converts equivalent text into a consistent representation:

\[ \text{NFC}=\text{Canonical Decomposition}+\text{Canonical Composition} \] \[ \text{NFD}=\text{Canonical Decomposition} \] \[ \text{NFKC}=\text{Compatibility Decomposition}+\text{Canonical Composition} \] \[ \text{NFKD}=\text{Compatibility Decomposition} \]

Complete Guide to Character Encoding

Character encoding is the system that turns human-readable text into bytes computers can store, transmit, and interpret. A letter, symbol, emoji, mathematical sign, Arabic word, Hindi phrase, or Chinese character is not stored as a visual drawing. It is represented by a code point and then encoded into bytes. Without a correct encoding, text can become unreadable, corrupted, or misinterpreted.

Unicode is the central standard for modern text. It assigns code points to characters across languages and scripts. For example, the Latin capital letter A is \(U+0041\), the euro sign is \(U+20AC\), and the waving hand emoji is \(U+1F44B\). A code point is an abstract number. It does not by itself say how many bytes are stored. That is the job of an encoding such as UTF-8, UTF-16, or UTF-32.

UTF-8 is the dominant web encoding because it is compact for ASCII text, supports the full Unicode range, and avoids many byte-order problems. ASCII characters from 0 to 127 encode as one byte in UTF-8. Many European and Middle Eastern characters use two bytes. Many Asian characters use three bytes. Emoji and other supplementary characters usually use four bytes. This variable-length design makes UTF-8 efficient and backward-compatible with ASCII for basic English text.

UTF-16 is common inside several programming environments, including JavaScript strings. UTF-16 stores text as 16-bit code units. Characters in the Basic Multilingual Plane use one code unit. Supplementary characters such as many emoji use two code units called a surrogate pair. This is why a JavaScript string length can be larger than the number of visible characters. The emoji is one Unicode code point but two UTF-16 code units.

UTF-32 is simpler conceptually because it uses one 32-bit unit per Unicode code point. Its simplicity comes with size cost. A basic English letter that needs one byte in UTF-8 takes four bytes in UTF-32. UTF-32 is useful for some internal processing and teaching, but it is not usually the best storage or web interchange format.

ASCII is the historical 7-bit encoding for basic English letters, digits, punctuation, and control characters. ASCII contains 128 values from 0 to 127. UTF-8 was designed so that ASCII bytes mean the same thing in UTF-8. That compatibility is one reason UTF-8 became practical for web adoption. However, ASCII cannot directly encode characters such as €, é, नमस्ते, مرحبا, or emoji.

Latin-1, also known as ISO-8859-1 in many contexts, extends the idea of single-byte text to 256 values. It can represent many Western European characters but not the full range of Unicode. Windows-1252 is a related legacy encoding used historically in Windows environments. Many mojibake problems happen when text encoded in one legacy encoding is decoded as another.

Mojibake is the visible corruption that happens when bytes are decoded with the wrong character encoding. For example, UTF-8 bytes for one character can appear as two or three strange characters if interpreted as a legacy single-byte encoding. The fix is not to visually repair the text by hand; the correct fix is to decode the original bytes using the correct encoding whenever possible.

A byte order mark, or BOM, is a special sequence at the start of some text files. It can signal the byte order for UTF-16 or UTF-32. UTF-8 does not need byte order, but some files still include a UTF-8 BOM. BOM handling can matter when reading CSV files, source code, configuration files, and data exports. This tool lets you add or strip BOMs for encoding and decoding experiments.

Endianness describes byte order. In UTF-16LE, the least significant byte appears first. In UTF-16BE, the most significant byte appears first. The same idea applies to UTF-32LE and UTF-32BE. If a file is decoded with the wrong endianness, the result may look completely broken. Understanding endianness is important in binary formats, networking, file parsing, and systems programming.

Base64 is not a character encoding like UTF-8. It is a binary-to-text encoding that represents bytes using printable characters. It is useful when binary data must pass through systems designed for text. Base64 is common in email, data URLs, tokens, and APIs. It is not encryption. Anyone can decode Base64 if they have the encoded text.

Percent encoding is used in URLs. A byte is written as a percent sign followed by two hexadecimal digits, such as %E2%82%AC for the UTF-8 bytes of the euro sign. URL encoding is byte-oriented, so the text must first be encoded into bytes, usually UTF-8, and then each unsafe byte is written using percent notation.

HTML entities are another representation layer. The character © can be written as ©, ©, or ©. Entities are useful when text must appear inside HTML without being interpreted as markup, or when a developer wants to show special characters safely. HTML escaping is also a security habit when displaying user text in a web page.

Unicode normalization is essential for reliable text comparison. The character é can be represented as one precomposed character or as the letter e followed by a combining accent. These may look the same but have different code point sequences. NFC, NFD, NFKC, and NFKD normalize text in different ways. Search, sorting, file names, usernames, and duplicate detection can behave incorrectly if normalization is ignored.

Grapheme clusters are what users often think of as characters. A single visible emoji can contain multiple code points joined together. A flag emoji uses regional indicator symbols. A family emoji may use several people emojis joined with zero-width joiners. A letter with a combining mark can be multiple code points but one visible unit. This is why the tool reports characters, code points, UTF-16 code units, grapheme clusters, and bytes.

JavaScript strings use UTF-16 code units internally. This means string.length reports code units, not Unicode code points or grapheme clusters. This matters when validating usernames, limiting posts, slicing emoji text, or storing multilingual text. Cutting a string at a random code-unit boundary can split a surrogate pair and create invalid text.

Developers should usually store and exchange text as UTF-8 unless there is a specific reason not to. HTML pages, APIs, JSON files, CSV exports, XML, Markdown, source files, logs, and databases are easier to handle when UTF-8 is used consistently. Legacy encodings may still appear in old files, regional datasets, archived systems, or exports from older software.

Character encoding is also a mathematical topic. It uses base conversion, binary representation, hexadecimal notation, bit masks, byte grouping, modular ranges, and variable-length coding. When a code point is encoded as UTF-8, its bits are distributed into byte templates. When bytes are displayed as hexadecimal, each byte is split into two 4-bit nibbles. Encoding is not magic; it is structured arithmetic.

This tool is useful for students learning Unicode, developers debugging mojibake, teachers preparing computer science lessons, publishers checking multilingual content, SEO teams working with URLs, and anyone who needs to see the actual bytes behind text. It is intentionally transparent: you can see the text, the bytes, the code points, and the formulas.

This page is not an official exam score calculator. There is no universal score guideline, score table, or next exam timetable for character encoding conversion. It can support computer science, web development, digital publishing, data handling, cybersecurity basics, and applied mathematics, but official exam schedules and grading rules must come from the relevant school, course provider, or exam board.

Accuracy note: this browser tool is designed for learning, debugging, and everyday conversion. Browser support for legacy decoding can vary. For legal, archival, forensic, or production migration work, verify byte-level results with dedicated encoding libraries and known test files.

Reference Links

Useful references: Unicode Standard, WHATWG Encoding Standard, MDN TextEncoder, MDN TextDecoder, and MDN String normalize.

How to Use Character Encoding Converters

  1. Choose a tool mode. Encode text, decode bytes, inspect characters, normalize text, or use escape tools.
  2. Select an encoding. Choose UTF-8, UTF-16LE, UTF-16BE, UTF-32LE, UTF-32BE, ASCII, Latin-1, or Windows-1252 style.
  3. Enter text or bytes. Encode mode expects text. Decode mode expects hex, binary, decimal, Base64, or percent-encoded bytes.
  4. Set BOM and error options. Add BOM, strip BOM, replace unsupported characters, or use strict mode.
  5. Run conversion. Click Convert Encoding and review all outputs.
  6. Inspect Unicode details. Review each character’s code point, decimal value, UTF-8 bytes, UTF-16 units, and HTML entity.
  7. Export results. Copy the main output, copy all details, download CSV, or print/save as PDF.
Encoding / Format What It Does Best Use
UTF-8 Variable-length Unicode encoding using 1–4 bytes per code point. Web pages, APIs, JSON, modern files, database text exchange.
UTF-16 Uses 16-bit code units; supplementary characters use surrogate pairs. JavaScript internals, Windows-style text processing, teaching code units.
UTF-32 Uses one 32-bit value per Unicode code point. Teaching, debugging, internal processing, direct code point inspection.
ASCII 7-bit historical English-focused encoding. Legacy systems, basic protocol examples, computer science basics.
Latin-1 / Windows-1252 Single-byte legacy Western encodings. Old files, mojibake debugging, legacy data migration.
Base64 Represents bytes using printable text characters. Emails, data URLs, APIs, tokens, binary-to-text transport.
Percent encoding Represents bytes as %HH sequences. URLs, query strings, URI debugging.

Score, Course, and Exam Table Note

Requested Item Status for This Encoding Tool Correct Guidance
Score guidelines Not applicable This is a text encoding and computer-science utility, not an official score calculator.
Score table Not applicable There is no universal academic score table for character encoding conversion.
Next exam timetable Not applicable Use official school, certification, or exam-board sources for course-specific exam dates.
Course relevance Useful for computer science and web development Supports Unicode, binary, hexadecimal, byte order, web text, encoding, decoding, and data representation lessons.

Character Encoding Converter FAQ

What is character encoding?

Character encoding is the method used to convert characters into bytes. Unicode defines code points, while encodings such as UTF-8 and UTF-16 define how those code points are stored.

What is the difference between Unicode and UTF-8?

Unicode is the character set and code point standard. UTF-8 is an encoding that represents Unicode code points as one to four bytes.

Why does an emoji count as more than one JavaScript character?

JavaScript strings use UTF-16 code units. Many emoji are supplementary characters represented by two UTF-16 code units, and some visible emoji contain multiple code points.

What is a byte order mark?

A byte order mark is a special byte sequence at the start of a file that can identify Unicode encoding or byte order, especially for UTF-16 and UTF-32.

Is Base64 encryption?

No. Base64 is a binary-to-text encoding. It is reversible and does not provide secrecy.

What is mojibake?

Mojibake is corrupted-looking text caused by decoding bytes with the wrong character encoding.

Should I use UTF-8 for new web content?

Yes. UTF-8 is the standard practical choice for modern web content, APIs, JSON, and general text interchange.

Advertisement

Trace a two-character round trip

Take the string Aé using the precomposed accented letter. A is U+0041 and é is U+00E9. In UTF-8 the bytes are 41 C3 A9 in hexadecimal. Thus two code points occupy three bytes. Decoding those three bytes as UTF-8 reconstructs the original string. A visually similar string formed from e and a combining accent has a different code-point sequence. When two values look identical but compare differently, inspect the code points as well as the displayed glyphs. Counting displayed symbols alone cannot determine the byte length.

Conversion of Another Base into Base 10 and Other Bases

We saw in Hindu-Arabic Positional System that our Hindu-Arabic system uses base 10, which is a system using place values of digits that depend on powers of 10 (or, are based on powers of 10). We’ve already worked with bases other than base 10: The Babylonian system was base 60, while the Mayan system was base 20.
To explore how our base 10 system is used, answer the following question: What’s the following quantity: 4,572? You probably said four thousand five hundred seventy-two (no, there is no “and” between hundred and seventy). But why do you think that 4 means four thousand? A very young person when learning their numbers might say that’s a four five seven and two. But you added the context of thousands to the four. Why?
Place value, that’s why. You learned early on that where the numeral was gave it different meanings. Ten thousands, thousands, hundreds, tens, and ones. So, you translate that symbol string (4,572) into “four thousand five hundred seventy-two.” As we saw in Hindu-Arabic Positional System, expanding a Hindu-Arabic number involved writing the number using each digit times its appropriate power of 10. So, we could write 4,572 as 4×103+5×102+7×101+2×100=4×1000+5×100+7×10+2×1.
One possible reason we use base 10 is that we have 10 fingers, and in the cultures where the Hindu-Arabic system developed, that became the standard. Other cultures may have used other ways of organizing numbers, perhaps using 20 by including toes, or using 60 because 60 has many divisors. Mathematically though, base 10 is an awkward base to work in since 10 has limited divisors. But we think it is easy and simple because that’s what we’ve been taught to use.
Using a base 10 system means we need 10 symbols to make our numbering system work: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
Now imagine that we all only had 6 fingers instead of 10 and our counting system was based on those 6 fingers. We would be counting in groups of 6, not groups of 10. How would this change how we work with quantity?
First, we’d need only six symbols. Let’s use 0, 1, 2, 3, 4, 5. Second, our place values would be based on powers of 6, not powers of 10. For instance, the number 3,024 in base 6 would be 3×63+0×62+2×61+4×60. That is how you can translate a base 6 number into a base 10 number. When we calculate that expression we get 3×63+0×62+2×61+4×60=3×216+0×36+2×6+4×1=648+0+12+4=664.
This means the base 6 number 3,024 is equal to the base 10 number 664.
From now on, if we are using a base 6 number, we will follow it with the subscript 6, like the following: 3,0246 means the number is in base 6.
A base 10 number gets no subscript (it’s the standard). So, 3,024 is a base 10 number. A base 13 number would be 4,67213.
So, a base 6 system uses only the symbols 0, 1, 2, 3, 4, and 5. Also, the place values use powers of 6. However, we still don’t know how to count in base 6. In order to do so, we’d have to know how to represent the quantities larger than five in base 6. Let’s review how our base 10 system works by counting from 0 to 100, which shows how larger values are represented.
In writing the base 10 numbers, you start with these first 10 values:
0 1 2 3 4 5 6 7 8 9
But you’ve run out of symbols. So, we use two digits:
10 11 12 13 14 15 16 17 18 19
The 1 out front means you’ve run out of digits one time.
But now you’ve run out twice. Continuing with those numbers gives:
20 21 22 23 24 25 26 27 28 29
And so on,
30 31 32 33 34 etc.…
Eventually, you hit the 90s,
90 91 92 93 94 95 96 97 98 99
And you’ve run out of the digits again! So, we say we’ve run out of digits in the tens place one time, hence:
100 101 102 103 104 105 106 107 108 109
That’s the pattern we use in base 10. We write out the symbols until we’ve used all the symbols, then add a digit in front that counts how many times we’ve used the digits. Knowing the numbers, or being able to count higher and higher, is necessary to understand how all the arithmetic works, as it all goes back to counting.
The counting pattern is the same for any other base, including base 6. So, let’s start:
0 1 2 3 4 5
But we’ve run out of symbols! Just like in base 10, we use a second digit, where the first digit will tell us we’ve run out of symbols one time.
10 11 12 13 14 15
And we use the same pattern:
20 21 22 23 24 25
30 31 32 33 34 35
40 41 42 43 44 45
50 51 52 53 54 55
But we’ve run out of symbols for that front digit. So, we indicate it the same way as in base 10…by adding a third digit in front, indicating we’ve run out of symbols once in the second place:
100 101 102 103 104 105
110 111 etc.
The symbol pattern is the same, but truncated. We only use the six symbols. So that is how we represent base 6. Being able to write out these numbers is important when working with addition in the base.
When using a base larger than 10, though, we need more symbols. Instead of creating new symbols, we use capital letters, with A representing the digit for "10," B representing the digit for "11," and so on.

Determining Digits of a Base with Less Than 10 Digits

What are the digits used for base 7?
Solution
Since this is base 7, we need only 7 symbols: 0, 1, 2, 3, 4, 5, 6.

Determining Digits of a Base with More Than 10 Digits

What are the digits used for base 14?
Solution
Since this is base 14, we need 14 symbols. We don’t have single character numbers for 10, 11, 12, and 13, so, in a fit of inspired creativity, we use capital letters A, B, C, D to represent those quantities. So, the digits in base 14 are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D.

Converting from One Base into Another

Convert 3,6017 into base 10.
Solution
In base 7, the place values are powers of 7. Since there are four digits, the highest power of 7 that is used is 3. This yields 3,6017=3×73+6×72+0×71+1×70=3×343+6×49+0×7+1=1,029+294+0+1=1,324.

Converting from Base 14 to Base 10

Convert 4B714 into base 10.
Solution
In base 14, the place values are powers of 14. Since there are three digits, the highest power of 14 is 2. Also recall that in base 14, 10 is represented by A, 11 is represented by B, 12 is represented by C, and 13 is represented by D. Using that, we convert to base 10:
4B714=4×142+B×141+7×140=4×196+11×14+7×1=784+154+7=945.

Converting from Base 12 to Base 10

Convert A1612 into base 10.
Solution
In base 12, the place values are powers of 12. Since there are three digits, the highest power of 12 is 2. Also recall that in base 12, 10 is represented by A and 11 is represented by B. Using that, we convert to base 10:
A1614=10×122+1×121+6×120=10×144+1×12+6×1=1,440+12+6=1,458.

Converting from Base 2 to Base 10

Convert 10112 into base 10.
Solution
In base 2, the place values are powers of 2. Since there are four digits, the highest power of 2 is 3. Using that, we convert to base 10:
10112=1×23+0×22+1×21+1×20=1×8+0×4+1×2+1×1=8+0+2+1=11.

Writing Numbers in Base Systems Other Than Base 10

Write the numbers in base 7 up to 1007.
Solution
Step 1: Using the patterns we indicated earlier, we begin with the first seven digits.
0, 1, 2, 3, 4, 5, 6
Step 2: Since we’ve run out of digits, we start with 10, indicating we’ve run out of symbols once.
10, 11, 12, 13, 14, 15, 16
Step 3: Continuing in the same way, we get:
20, 21, 22, 23, 24, 25, 26
30, 31, 32, 33, 34, 35, 36
40, 41, 42, 43, 44, 45, 46
50, 51, 52, 53, 54, 55, 56
60, 61, 62, 63, 64, 65, 66
Now, all the digits have been used in the leading digits. Since the digits have all been used in that leading digit, we use 100, as in base 10.
100

Writing Numbers in Bases with More Than 10 Symbols

Write the numbers in base 14 up to 10014.
Solution
Step 1: Using the patterns we indicated earlier, we begin with the first 14 digits.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D
Step 2: Since we’ve run out of digits, we start with 10, indicating we’ve run out of symbols once.
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D
Step 3: Continuing in the same way, we get:
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 2A, 2B, 2C, 2D
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 3A, 3B, 3C, 3D
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 4A, 4B, 4C, 4D
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 5A, 5B, 5C, 5D
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 6A, 6B, 6C, 6D
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 7A, 7B, 7C, 7D
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 8A, 8B, 8C, 8D
90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 9A, 9B, 9C, 9D
A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, AA, AB, AC, AD
B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, BA, BB, BC, BD
C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, CA, CB, CC, CD
D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, DA, DB, DC, DD
100
Base 2 is important in the digital age, as it is the system used by computers. It is the simplest base to work with, but has the drawback that the numbers in base 2 may use many, many digits. In Addition and Subtraction in Base Systems and Multiplication and Division in Base Systems, we will look at base 2 in each situation.

Writing Numbers in Base 2

Write the numbers in base 2 up to 1002.
Solution
Base 2 uses only two symbols: 0 and 1. Following the pattern established previously, the numbers in base 2 up to 1002 are 0, 1, 10, 11, and 100.

Conversion of Base 10 into Another Base

Converting from base 10 into another base uses repeated division, recording the remainder at each step. Then, the number in the new base is the remainder starting from the last remainder found. To be accurate in what we’re saying, we need to remind ourselves of some terminology associated with division. When integers are divided, the one being divided is the dividend, and the one that is dividing the dividend is the divisor. The quotient is the largest natural number that can be multiplied by the divisor where the product is less than the dividend.
When the integer n is divided by the integer d, n is called the dividend and d is the divisor.
To convert a base 10 number n into base d, we divide n by d, recording the remainder. Then we divide the quotient from that step by the base d, and record the remainder again. We continue this process until the quotient is 0. Then, the base d number has digits that start with the last remainder and use each remainder in reverse order.

Converting from Base 10 into a Lower Base

Convert 298 to base 6.
Solution
We divide 298 by 6, and record the remainder. Then we divide the quotient from that step by 6, and record the remainder again. We continue this process until the quotient is 0. Then, the base 6 number has digits that start with the last remainder and use each remainder in reverse order.
Step 1: When we divide 298 by 6, we get 49r46298. The quotient is 49 and the remainder is 4.
Step 2: Now we divide the quotient, 49, by 6. This gives 8r1649. The quotient is 8 and the remainder is 1.
Step 3: Repeating, we get 1r268. The quotient is 1 and the remainder is 2.
Step 4: Finally, we perform the operation on the quotient 1, 0r161 giving us a quotient of 0 and a remainder of 1.
Step 5: The base 6 number has digits equal to the remainders in reverse order, 12146. So, 298 in base 10 when converted to base 6 is 12146.

Converting from Base 10 into a Higher Base

Convert 45,134 to base 13.
Solution
We divide 45,134 by 13, and record the remainder. Then we divide the quotient from that step by 13, and record the remainder again. We continue this process until the quotient is 0. Then, the base 13 number has digits that start with the last remainder and use each remainder in reverse order. It is at this step that we’ll convert to the base 13 digits, which are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C.
Step 1: When we divide 45,134 by 13, we get 3,471r111345,134 . The quotient is 3,471 and the remainder is 11.
Step 2: Now we divide the quotient, 3,471, by 13. This gives 267r0133,471. The quotient is 267 and the remainder is 0.
Step 3: Repeating, we get 20r713267. The quotient is 20 and the remainder is 7.
Step 4: Again, and we get 1r71320. The quotient is 1 and the remainder is 7.
Step 5: Finally, we get 0r1131, with quotient 0 and a remainder 1.
Step 6: The base 13 number has digits equal to the remainders in reverse order, which were 1, 7, 7, 0, and 11. The 11 is written as B in base 13. So, 45,134 in base 10 when converted to base 13 is 1770B13.

Converting from Base 10 into Base 2

Convert 100 to base 2.
Solution
Following the pattern above:
Step 1: We divide 100 by 2, and record the remainder.
Step 2: Then we divide the quotient from that step by 2, and record the remainder again.
Step 3: We continue this process until the quotient is 0.
Step 4: Following this process, the remainders are, in order, 0, 0, 1, 0, 0, 1, 1. Writing those in reverse order gives the number in base 2, 11001002.
Notice that 100 in base 2 took seven digits.