# Newbie question "How long is id3v2 tag?"

**URL:** https://community.mp3tag.de/t/newbie-question-how-long-is-id3v2-tag/3815
**Category:** General Discussion
**Created:** [September 24, 2006, 10:30am UTC](https://community.mp3tag.de/t/newbie-question-how-long-is-id3v2-tag/3815 "2006-09-24T10:30:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![maverick](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/258eb7/32.png) [@maverick](https://community.mp3tag.de/u/maverick)
#### Post date: [September 24, 2006, 10:30am UTC](https://community.mp3tag.de/t/newbie-question-how-long-is-id3v2-tag/3815/1 "2006-09-24T10:30:36Z")

</div>

I see some online info on id3v2 such as [http://www.id3.org/id3v2.4.0-structure.txt](http://www.id3.org/id3v2.4.0-structure.txt), however, I cannot figure out how long id3v2 tag is (id3v1 is too easy.)

The document says the header reads

```
 ID3v2/file identifier "ID3"
 ID3v2 version $04 00
 ID3v2 flags %abcd0000
 ID3v2 size 4 * %0xxxxxxx

```

Looking at actual mp3 files, I can see id3v2 identifier (ID3) and ID3v2 version, but I cannot understand id3v2 flags and size, especially %abcd0000 and 4 \*%0xxxxxxx part.

Will anyone help me?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [September 24, 2006, 11:38am UTC](https://community.mp3tag.de/t/newbie-question-how-long-is-id3v2-tag/3815/2 "2006-09-24T11:38:57Z")

</div>

Maybe you should have a look at the implementations on the same site: [http://www.id3.org/implement.html](http://www.id3.org/implement.html) or the open-source-library on [http://id3lib.sourceforge.net/](http://id3lib.sourceforge.net/)

This site [http://getid3.sourceforge.net/](http://getid3.sourceforge.net/) offers a downloadable php-project and a forum. 😉

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [September 24, 2006, 12:11pm UTC](https://community.mp3tag.de/t/newbie-question-how-long-is-id3v2-tag/3815/3 "2006-09-24T12:11:30Z")

</div>

Mp3tag has placeholders for tag sizes you can use in the columns:  
$div(%\_tag\_size%,1024)kb (%\_tag\_size\_prepended%/%\_tag\_size\_appended%)

ID3v2.4 Info:  
You should read these parts closely from id3v2.4.0-structure.txt:  
2. Conventions in this document  
3.1. ID3v2 header  
6.2. Synchsafe integers

A small example (I hope it's correct)

```
Header:
$49 $44 $33 | $04 $00 | $80 | $00 $00 $10 $77

Decode Flag Byte: (from hex to binary)
$80 -> %10000000 : Bit a - Unsynchronisation

Decode Tag size Bytes:
$10 $77 - > %1000001110111

10000 | 01110111 : remove Bit 7
        ^
->
 1000 | 01110111

%100001110111 -> 2167
Tag size: 2167 Bytes
```

---

<div class="post-metadata">

### Author: ![lowandslow](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/aca169/32.png) [@lowandslow](https://community.mp3tag.de/u/lowandslow)
#### Post date: [August 5, 2014, 9:56pm UTC](https://community.mp3tag.de/t/newbie-question-how-long-is-id3v2-tag/3815/4 "2014-08-05T21:56:46Z")

</div>

QUOTE (dano @ Sep 24 2006, 16:11) \<{POST\_SNAPBACK}\>

Mp3tag has placeholders for tag sizes you can use in the columns:

$div(%\_tag\_size%,1024)kb (%\_tag\_size\_prepended%/%\_tag\_size\_appended%)

ID3v2.4 Info:  
You should read these parts closely from id3v2.4.0-structure.txt:  
2. Conventions in this document  
3.1. ID3v2 header  
6.2. Synchsafe integers

A small example (I hope it's correct)

```
Header:
$49 $44 $33 | $04 $00 | $80 | $00 $00 $10 $77

Decode Flag Byte: (from hex to binary)
$80 -> %10000000 : Bit a - Unsynchronisation

Decode Tag size Bytes:
$10 $77 - > %1000001110111

10000 | 01110111 : remove Bit 7
        ^
->
 1000 | 01110111

%100001110111 -> 2167
Tag size: 2167 Bytes<!--QuoteEnd--></div><!--QuoteEEnd-->

```

Sorry for bumping an old post. But you are a life saver! Thank you so much for this. It helped a lot. I wish you could rep people on this forum.
