An archchancellor (Latin: archicancellarius, German: Erzkanzler) or chief chancellor was a title given to the highest dignitary of the Holy Roman Empire, and also used occasionally during the Middle Ages to denote an official who supervised the work of chancellors or notaries.
The Carolingian successors of Pepin the Short appointed chancellors over the whole Frankish realm in the ninth century. Hincmar refers to this official as a summus cancellarius in De ordine palatii et regni and an 864 charter of King Lothair I refers to Agilmar, Archbishop of Vienne, as archchancellor, a word which also begins appearing in chronicles about that time. The last Carolingian archchancellor in West Francia was Archbishop Adalberon of Reims (969-988), with the accession of Hugh Capet the office was replaced by a Chancelier de France.
At the court of Otto I, then King of Germany, the title seems to have been an appanage of the Archbishop of Mainz. After Otto had finally deposed King Berengar II of Italy and was crowned Holy Roman Emperor in 962, a similar office was created for the Imperial Kingdom of Italy. By the early eleventh century, this office was perennially held by the Archbishop of Cologne. Theoretically, the archbishop of Mainz took care of Imperial affairs for Germany and the Archbishop of Cologne for Italy, though the latter often used deputies, his see being outside of his kingdom. A third office was created about 1042 by Emperor Henry III for the recently acquired Kingdom of Burgundy. He initially bestowed it on Archbishop Hugh I of Besançon. It only appears in the hands of the Archbishop of Trier in the twelfth century as the chancellory of Arles, as Burgundy was then known.
By the Golden Bull of 1356, Emperor Charles IV confirmed the threefold division of the archchancellory among the three ecclesiastical Prince-electors of the Empire. Actual governmental functions like calling the Imperial elections, however, were carried out by the Mainz archbishops alone. The office in this form was part of the constitution of the Empire until the German Mediatisation in 1803, when Mainz was secularised. The last elector, Karl Theodor Anton Maria von Dalberg, however, retained the title of archchancellor until the dissolution of the Empire in 1806. There was a marked resemblance between the medieval archchancellor and the later chancellors of the German Empire, the Weimar Republic,  and the Austrian Empire. The title is continued by the present-day Chancellors of Germany and Austria.