By freedom of religion, I mean some law or constitution that includes "prohibiting the making of any law respecting an establishment of religion or impeding the free exercise of religion" like the first amendment.
By just before, I mean the years in Germany before Hitler rose to power.
Articles 135 to 141 of Section III of the Weimar Constitution, adapted in 1919, provided for broad protections of religious freedom, assembly, and conscience. Section III was an an expansion of the 1869 North German Confederation's Law on Freedom of Religion. The Enabling Act of 1933 allowed Hitler rendered the Weimar constitution null in the name of security and stabilization. The Third Reich did not promulgate a new comprehensive law on religion to replace Articles 135 to 141 and instead preferred to negotiate separately with the established German Christian confessions over their relationship with the state and the rights of their believers. The result was agreements like the Reichskonkordat with the Catholic Church that delimited the rights of the Catholic Church in Germany.
This flexible legal approach to the confessional question allowed for the Third Reich to persecute religious sects that the state deemed harmful to the new order. The Jehovah's Witnesses were among the most prominent of the religious victims of the Third Reich. The state was also not an honest partner in its relationships with the established churches and it often clawed back concessions to Christian autonomy and independence. Infringements of these agreements was an escalating source of tension between the government and the Catholic and accepted Protestant churches.
Although many German religious leaders would contend, with a good deal of justification, that Hitler and NSDAP only begrudgingly dealt with the churches out of political expediency, the Third Reich's turn away from broad religious toleration was an opinion that did find resonance in some quarters of the Weimar churches, some of whose leaders saw the Republic's new freedoms as an affront to Christian morality. Moreover, while the leadership of the established confessions begrudgingly accepted each other, such toleration seldom extended to new sects and forms of religious expression. Von Hindenburg had sanctioned prosecution and suppression of Jehovah's Witnesses in 1931 and there were sporadic prosecutions in the 1920s despite the Weimar constitution's protections. Direct negotiations with the state also held out the promise of greater uniformity for religious law since during the Republic, the churches often had to negotiate separately with the various Länder over rights and privileges.