The majority of items in Team Fortress 2 have levels associated with them. Levels, viewed with the item name in the loadout menu, are purely cosmetic and do not modify the effectiveness of any weapon or item.
Originally, when the item drop system was first implemented in the Sniper vs. Spy Update, item levels were added by the developers to test if level functionality could be included. Dropped items were given a random level between 0 and 100, and the level would appear under the name of the item, visible to all players.
Random leveling is no longer a feature as of the May 29, 2009 Patch. All new items receive a standard level. However, cosmetics will still receive random levels between 0 and 100 and this was later amended to levels 1 through 100 some time after the Classless Update. All existing items retained their levels. The ability to view levels in the in-game backpack for Cosmetics has since returned as of the August 18, 2011 Patch.
The Dueling Badges, Mann vs. Machine Badges, and the Duck Journal are the only items to change level. The Dueling Badge's level increases by 1 for every 10 duels won by the player, changing into the next tier of badge at levels 25, 50, and 75. MvM Badges level up each time the player completes a Tour of Duty. The Duck Journal levels up with the second, third, fourth, and fifth use of a Duck Token, increasing from levels 1 to through 5.
Strange items do not have visible item levels, unless viewed by a third party website such as backpack.tf or tf2outpost, but do have a rank prefix that changes according to the number of kills the player has made with the weapon.
Certain Mann Up rewards, such as Botkiller weapons and Killstreak Kits, are assigned a level equal to the tour number that is completed when they are obtained, up to level 255. After 255 they will cycle back to level 0 and repeat their previous levels.