Kádár was born out of wedlock as János József Czermanik as the son of the soldier János Krezinger and the servant maid Borbála Czermanik. Krezinger came from a smallholder family of Pusztaszemes, Somogy County. Kadar's father had possibly Bavarian German origins. Krezinger met with Borbála during his military service, who was born in Ógyalla (today Hurbanovo, Slovakia) to a landless Slovak father and Hungarian mother. The story however on how they met is unknown. Abandoned, Borbála gave birth to János in Fiume's Santo Spirito Hospital on 26 May 1912. Having given birth in the middle of the holiday season, no one wanted to employ a single mother with a child. His mother, Borbála went to look for Krezinger, but his family wanted nothing to do with them. She walked ten kilometres to the city of Kapoly, she was able to persuade a family by the name of Bálint to care for her child. For this however, they wanted pay. In the meantime Borbála looked for work in the nation's capital, Budapest.
His mother was able to visit during the holidays, meaning only a few times a year. His foster father, Imre Bálint took care of him. But it was Bálint's brother, Sándor Bálint, Kádár would remember as his "true" foster father. While Imre had joined the Austro-Hungarian army during World War I, Sándor was left to take care of Kádár. Sándor clearly showed much interest in the boy, and seems to be the only man Kádár had a good relationship with throughout his early childhood. Due to the great strain put on the family because of World War I, Kádár started working at an early age and helped Sándor take care of his sick wife. Kádár, as an old man, noted how early experiences in his childhood moved him towards Marxist-Leninism, the most notable one being when he was accused of setting a building on fire instead of catching the true culprit, the inspector's son. Suddenly in 1918, at the age of six, Borbála reclaimed him, moved him to Budapest and enrolled him in school. In school he got bullied by classmates and his teacher for his bumpkin manners and his peasant terms. At the same time as his troubles at school, it took time before he and Borbála became "friends". His mother being a devoted Catholic, was surprised to find out that Kádár was not brought up as one.
In addition to being an assistant caretaker, Borbála delivered newspapers in the morning. She did all this to ensure that Kádár would be getting a better education than she did. Piroska Döme, who met Borbála much later to life, notes that her hands were disfigured because of manual work. In the summer time, Kádár would find work in the countryside. As Kádár later said, he was seen as "alien" by his contemporaries, in the countryside they would call him a "city boy" while in the city they would call him a "country boy". Living in Városház street gave him a good start at life, but the family's poverty and his illegitimacy made him stand out, this made normal social development for a boy of his age difficult. Then in 1920, Borbála got pregnant again, with the man impregnating her leaving soon. Kádár had to help Borbála take care of her new son, and his half-brother, Jenő. Because of the pregnancy Borbála lost her job, and they moved to 13th District of the Angyalföld area. Borbála refused to talk about Kádár's father, something which left Kádár bewildered.
Kádár attended and passed the admission exam to the Cukor Street Elementary School. It offered what Borbála always wanted for him, and Kádár proved to be a bright student. However his discontent regarding his current situation manifested in him skipping school on various occasions. Endangering Borbála's future hopes of him, she usually hit him many times when it became known to her that he skipped class. He proved to be an able student in most subjects on only moderate efforts. Yet he saw no reason to study too hard, and usually skipped school to play football or other sports. He did read often however, but his mother was unimpressed by this and ironically asked him if he was a "gentleman of leisure". Kádár left school at the age of fourteen in 1926. His education gave him a promising opportunity in light industry, it did however, take a year for him to find a job after being turned down as a car mechanic. In 1927, he became a typewriter mechanic, a profession which had a high standing among the Hungarian working class, there were only 160 of them in the country.
His first meeting with Marxist literature came in 1928 after he won a junior chess competition organised by the Barbers Trade Union. His prize was Friedrich Engels's Anti-Dühring. The tournament organiser explained to Kádár that if he didn't understand it after his first reading, he should re-read it until he understood it. Kádár followed his advice, even if his friends were "unimpressed" by his reading. As he later noted later in his life, he did not understand the reading but it got him thinking: "Immutable laws and connections in the world which I had not suspected." While it may be true that as Kádár comments that the book had great influence over him, it was in 1929 when he was fired after he flared up at his employer after he talked condescendingly towards Kádár. When the Great Depression hit Hungary, Kádár was the first to be fired. What ensued was low paid jobs and poverty. He later became unemployed, and it was this experience which brought him into contact with the Communist Party of Hungary. According to Kádár he became a member of the party in 1931.
In September 1930, Kádár took part in an organised trade union strike. The strike was crushed by the authorities, and many of his fellow communists were arrested. In the aftermath of the failed strike, he supported the party by gathering signatures for candidates of the
Socialist Workers' Bloc, an attempt by the Communist Party to create a front which would win over new supporters. This attempt was thwarted by the authorities, and new arrests ensued. In June 1931, he joined the communist youth organization, the
Communist Young Workers' Association (KIMSZ). He joined the Sverdlov party cell, named after Soviet Yakov Sverdlov. His alias within the party became János Barna. During his early membership, the party was illegal, following the crushing of the 1919 Hungarian Soviet Republic. In December 1931, the authorities had been able to track him down, and Kádár was arrested on charges of spreading communism, and being a communist. He denied the charges, and because of lack of evidence, was released. He was however under constant police surveillance, and after some days, he was back in contact with KIMSZ. He was given new responsibilities, and by May 1933 he became a member of the KIMSZ Budapest committee. Because of his promotion in the communist hierarchy, he was given a new alias, Róna. The party suggested, but Kádár rejected, the offer of studying at the Lenin Institute in Moscow, claiming that he could not leave his family alone. His advance up the hierarchy came to an end when he was arrested on 21 June 1931 with other communist activists. Kádár cracked because of police brutality, when he later confronted his fellow arrested communists, he realised he had made a mistake and denied and retracted all his confessions. He was sentenced to two years in prison. Because of his confessions to the police, he was suspended from KIMSZ.
After being released for parole, he was politically in limbo. The hope of rejoining the Communist Party was shattered by the Comintern's decision to dissolve the national communist party in Hungary. The few remaining members of the party were told to infiltrate and work co-operatively with the Social Democratic Party of Hungary and trade unions. Kádár had in the meantime been able to persuade himself that it was because of changes within the party, and not his confessions, which had led to none of his associates making contact with him. He did, at the same time, have four more months of his prison sentence to serve before being released. In prison Kádár met with Mátyás Rákosi, a commissar of the Hungarian Soviet Republic and a renowned political prisoner. While Kádár later claimed that there grew a father-son like bond between them, the more plausible truth is that there grew a "somewhat adolescent cheekiness" between the two. In prison, Rákosi interrogated Kádár, and came to the conclusion that his confessions were due to his "shortcomings". After being released from prison for good, some former party activists made contact with him and instructed Kádár to infiltrate the Social Democratic Party with them. Within the party, Kádár and his associates made no secret of their Marxist views, frequently talking about the struggles of the working class and their gaze, which was directed towards the Soviet Union.
Kádár still lived in poverty, and found it hard to blend in with the upper working class and the intelligentsia. Paradoxically, his main Communist contact in the Social Democratic Party was a sculptor named
György Goldmann. Kádár evolved into an effective speaker on "bread and butter issues", but failed at having any success on more serious and complex topics. In 1940 he was recalled to the party's ranks. At the beginning of its refounding, the party liked to use members without any police records, therefore Kádár was given more responsibilities within the infiltration of the Social Democratic Party. During May and June the police arrested and rounded up several party activists, including Goldman, but Kádár had managed to go into hiding. As early as May 1942, Kádár became a member of the newly formed Central Committee of the Communist Party, mostly due to the lack of personnel, seeing that the majority of them had been sent to prison. István Kovács, the acting party leader from December 1942, said; "he [Kádár] was extremely modest, a clever man but not then theoretically trained". Kovács brought Kádár into the party leadership and gave him a seat in the Secretariat of the Central Committee. By January 1943, had been able to get in touch with some seventy to eighty members, but this effort was torn apart by a new round of mass arrests, with Kovács being among them.
The new leadership after the last mass arrest consisted of Kádár as First Secretary, Gábor Péter,
István Szirmai and
Pál Tonhauser. During Kádár's first tenure as leader of the party, he faced many problems, the most important being that the communists were becoming increasingly irrelevant in a fast-changing situation, mostly because of the Hungarian government's continuing interference. In a meeting with Árpád Szakasits, a left-leaning Social Democrat, Kádár was asked to stop the party's illegal infiltration of his party. This meeting led to criticism being mounted against him during a Central Committee plenum meeting. In February 1936, Peter came up with an idea; his idea was to dissolve the party so that party members independently could spread communism, while a small secret leadership structure could keep itself together for some years. This, he said, would stop the continuing mass arrest of the communist party personnel and in turn strengthen the party for the future. While at the beginning Kádár was against such an idea, the idea grew on him and came to the conclusion that instead of dissolving the party, he would pretend to dissolve it and rename the party which would effectively throw the Hungarian authorities off their trail. The so-called "new party" was formed in August under the name, Peace Party. This decision was not supported by all, and the Moscow-based Hungarian Communists led by Mátyás Rákosi condemned the decision and domestic militants. Kádár disagreed with the criticism laid against him, claiming it was a "tactical retreat" which led to the renaming of the party, but with no changes to either the party's principles or structures. His attempted plan to fool the police failed, and the police continued arresting Hungarian Communists. Later in his life, this would be one of the few topics of his life Kádár would refuse to discuss.
After the German invasion of Hungary, the Peace Party, with other parties, established the
Hungarian Front, the party's potential allies were still very wary of them. Therefore, the Popular Front was never able to win much support amongst the populace. In the aftermath of the invasion, the party under Kádár's leadership started partisan operations and created their own Military Committee. Kádár tried to cross the border into Yugoslavia in hope of making contact with the Yugoslav partisans and their leader, Josip Broz Tito. At the same time, Kádár probably hoped to establish better, and stronger, relations with the USSR; something they had been trying to do since 1942. Kádár was given a new identity as an army corporal trying to cross the Hungarian-Yugoslav border. This attempt failed, and he was sentenced to two and a half years in prison. The authorities never figured out his real identity therefore members such as Rákosi thought he was a secret agent for the police. There is however no hard proof for these accusations, and incompetence remains the sole plausible reason. It was later proven, when SS officer Otto Winckelmann reported to Berlin that Kádár had been arrested, they had mistakenly confused Kádár for another communist.
Kádár, while in prison, was able to send out messages to Péter, and other high-ranking party members, they were able to orchestrate a scheme to free him. In the meantime, the leader of Hungary Miklós Horthy was conspiring against the German occupiers. There were rumours that claim that Horthy tried to get in contact with Kádár, but did not know that he was in prison. Horthy was deposed by the German government and replaced by Arrow Cross Party leader Ferenc Szálasi. Szálasi's policies had an immediate effect on Kádár; he had emptied the prison Kádár lived in and sent them to Nazi concentration camps. Kádár was able to escape and made his way back to Budapest. Immediately after his return to Budapest, Kádár headed the communist party's military committee. The committee tried to persuade workers to help the Soviet forces, but was not able to muster much support from the populace, therefore its effect was marginal at best. After the Soviet victory in Budapest, he changed his name from Csermanek to Kádár, literally meaning "cobber" or "barrel-maker".